What is the G-Query Quick Connector?
During G-Query creation, each queried column must be mapped to a Domain Attribute. While this can still be done with the Add option in the G-Query dashboard, the process is repetitive and time-consuming for larger queries that involve many Database Columns and Domains.
The Quick Connector streamlines this process with an efficient, intuitive approach, eliminating repetitive steps. Query columns are identified based on the entered query, and Attributes are listed based on the selected Domain. Users choose a Domain in the Quick Connector form and match it to a Query Column.
For example, a user needs to map a database table’s 'deptCode' column to a 'deptCode' Domain Attribute. By dragging the ‘deptCode’ Domain to the corresponding 'deptCode' query column in the Quick Connector form, the mapping is completed swiftly, illustrating the feature's ease of use. It only takes a few seconds to map multiple pairs for a G-Query.
In This Article
- Supported Query Types for Quick Connector
- Example - Query Columns from the Department and User Table in a Database
- Quick Connector Mapping Steps
- Additional Quick Connector Options
- Quick Connector FAQs
Supported Query Types for Quick Connector
This feature is available only when the Query Before or Query Each types are selected for a G-Query. It cannot be used with other query types, or if your query does not include columns that can be mapped to Domain Attributes.
- Query Before - Query columns from one or more database tables as a set of data that is buffered into memory.
- Query Each - Query one row of columns, from one or more database tables, on each row iteration of test data generation.
Example - Query Columns from the Department and User Table in a Database
In the example below, the user configures a G-Query to retrieve real values from columns in both the Department and User tables in a MySQL database. Before mapping, the user has already written their SQL query and identified which columns from which tables they want to use. These values then need to be mapped to the correct Domain Attributes.
- Department Table Columns - name, phone_number → Department Domain - deptName, deptPhone
- User Table Columns - first_name, last_name, middle_initial, dob → User Domain - firstName, lastName, middleInitial, dob
Note: A list of sequential steps for using the Quick Connector follows in the next section of this article.
In the Quick Connector form, users match Attributes (left) with Query Columns (right) by dragging and dropping. Text values can be entered into the Attribute and Column filter fields to help with large lists, saving time and effort.
Department Domain and Database Table
User Domain and Database Table
Note: The residence and years Attributes shown in the image above exist in the Domain but are not queried columns.
After saving the change, the information will be shown in the Domain Attributes section of the G-Queries dashboard.
Quick Connector Mapping Steps
To use Quick Connector, follow these steps. All other G-Query steps remain the same.
- Select Quick Connector in the G-Query dashboard.
- Select a Domain from the drop-down. Use the Filter field to locate a Domain quickly.
- (Optional) Filter Query Columns on the top right (useful for many columns).
- Map each Attribute to a Column by dragging it to the target Column and releasing to complete the mapping.
- Repeat for each Attribute and Column that needs to be matched for the Domain.
- For multiple Domains, choose the next Domain and repeat the process.
- Select Save to finish and save the changes.
- The mapped columns will appear at the bottom of the G-Query dashboard.
Additional Quick Connector Options
Additional options are available within the Quick Connector form. These include the following:
- Show Only Currently Connected Fields and Columns Checkbox - When checked, only connected columns are displayed.
- Detangle Connections - Straightens crossed connection lines for better viewing.
- Reset Connection - Removes all connections for the selected Domain.
Quick Connector FAQs
Question 1 - What happens if a Domain Attribute is not mapped to a Query Column?
- Synthetic data is generated for unmapped Attributes.
- Users can adjust the Generator or its parameters for custom data.
Question 2 - Are there warnings or errors if a mapping is invalid or incomplete?
- Connections will not be completed if the Attribute is not dragged to an appropriate location.
- Errors are provided when an invalid query is entered and the user attempts to save the query.
- An error is also provided if the query is invalid and the user attempts to select Quick Connector.
Question 3 - Can Domain Attributes be mapped to the same Column?
- Yes, Domain Attributes can be mapped to the same Column based on the user's query needs.
- Example - A code may need to be queried by Attributes in multiple Domains.
Question 4 - Can users undo a mapping or revert changes before saving?
- A connection can be altered by dragging and dropping the Attribute to another Column.
- Additionally, all connections can be cleared for a selected Domain by using the Reset Connections option.