Query Designer Capabilities¶
- Selecting Entities and Attributes
- Alternative/Non-base Views
Selecting Entities and Attributes¶
Adding an entity to the query can be done through the Entities Pane on the Query Designer. To select an Entity simply click on the Entity name listed in the All Entities pane.
To search an Entity, type in the search phrase on Search entities text field and press enter. This will search the first 25 Entities where the entity name starts with the search phrase. If the Entity you search for is not listed within the search result try clicking on Show more button at the bottom of the list.
After selecting an Entity, the Query Designer will display all the Attributes of the Entity in the Attributes pane. Expand the relevant Entity to see the Attributes by clicking on ▼ icon next to the Entity name. The data type of each Attribute is indicated right next to the Attribute name. To select an Attribute click on the Attribute name or the checkbox. Selected Attributes are indicated by the checkmark to the left of the Attribute name.
Users also can search for Attributes by typing the attribute name in Search attributes text field.
Selected Attributes can be deselected by clicking on the Attribute name. The checkmark will be removed indicating the Attribute is no longer used in the query.
To remove a selected Entity, find the Entity either in the Selected Entities pane or the All Entities pane and click on the X button next to the Entity name. This action will remove every information related to the Entity from the query.
Users can reorder the selected Attributes by dragging and dropping them to the new location within the Selected Attributes pane.
A basic filter can be applied to any selected Attribute. Click on the menu button of the Attribute in the Selected Attributes pane. Select Filter menu. Based on the datatype of the Attribute a list of supported filter conditions and an input field will be presented. Select the required condition and the value. Click on Apply. The filter is now applied to the Attribute and it will be indicated by an icon next to the Attribute name in the Selected Attributes pane.
|Filter menu for Text Attribute||Filter menu for Numerical Attribute|
|Filter menu for Boolean Attribute||Filter menu for Date/Time Attribute|
Basic filters can be applied to any number of selected Attributes at the individual attribute level. Each condition will be joined with an AND operator.
The filter pane allows the user to create advanced filters. To open/close the filter pane, click on the Filter button at the bottom of the Query Designer.
To create a filter using the Filter pane, click on the Add Condition button.
The four inputs in a filter condition are as follows,
1. The first dropdown box will list all the entities selected into the current query. 2. After selecting the entity from the first dropdown, the second dropdown will display all the attributes of the selected entity. 3. Based on the data type of the selected attribute the third dropdown will display a list of supported conditional operators 4. The fourth input box will be displayed after selecting the filter operator. This input box will be different based on the data type of the selected attribute and the selected filter operator.
After selecting all three values for the dropdown of the filter condition, enter the filter value into the Value input.
To remove a filter condition, click on the [X] button next to the filter condition.
Users can select either logical AND or logical OR as the logical operator of the filters by clicking on the radio button on the top of the Filter pane.
The Query Designer will warn the user if there are incomplete filter conditions. These warnings will be visible on the Filter pane button on the bottom of the Query Designer even if the Filter pane is closed. To see more details of the warning, hover over the (i) icon.
- Filter conditions created in the Selected Attributes pane are also displayed and can be modified in the Filter pane.
- If the filter conditions created in the Filter pane are too complex, the Basic Filters option will be disabled in the Selected Attribute pane.
- The query cannot be previewed or saved if Filter pane warnings exist. To preview or save the query, either remove or complete the erroneous filter condition.
The query can be sorted by one or more selected Attributes. To do so, click on the menu button of the selected Attribute in the Selected Attributes pane and select the sorting direction. Repeating the same will toggle the action. The sorting direction will be indicated on the Attribute pane next to the relevant Attribute and the Selected Attributes pane.
To set an alias to a selected Attribute click on the menu button next to the relevant Attribute's name in the Selected Attributes pane. Click on Alias. Type in the alias and click Apply. The alias will be displayed on the Selected Attributes pane as well as on the Attribute pane. The original Attribute name will also be visible next to the alias.
Note: Only letters, numbers and, underscore ( _ ) are allowed
The Query Designer has the capability of joining Entities automatically based on the reference details. When a user selects more than one Entity, the Query Designer will look for all the reference details with previously selected Entities and add them into the join details. The references being used will be displayed in the References pane.
In case there are multiple reference details found, the Query Designer will prompt the user to select the reference to be used in their query.
If the selected Entity does not have any reference with previously selected Entities, the Query Designer will prompt for the user confirmation to keep the entity or remove it.
To add the entity into the Query Designer and manually configure the Join conditions, click on Yes, keep the entity button. Otherwise, click on No, remove the entity to remove it from the query.
The Join pane allows the user to modify the Entity joining conditions. Moreover, it enables the user to add entities that do not have pre-configured reference information into the query.
In the Join pane, each row represents an individual join condition between two Entities selected into the query. Users can modify these conditions as needed.
To configure an incomplete join configuration, the user must select an entity from the 2nd dropdown to join with (in this case) CustomerInfo entity. Then using the 3rd and 4th dropdowns, the user must select the attributes from each entity that should be used in the join configuration.
Using the [+] button (1) next to the attributes dropdowns, the user can add more attribute combinations into the join configuration. To remove an attribute pair from a join configuration click on the [X] button (2) next to the relevant attributes pair.
The Query Designer will warn the user if there are incomplete join configurations. The query cannot be previewed or saved if Join pane warnings exist. To preview or save the query, either remove or complete the erroneous filter condition.
When an Entity is removed from the query, join information related to the removing Entity will also be removed from the query.
At the moment the Query Designer supports only the "Inner Joins".
To apply aggregation to a selected Attribute, click on the menu button next to the relevant Attribute's name in the Selected Attributes pane. Click on Aggregate and select the required aggregation function.
If the query has multiple Attributes, the Query Designer will indicate that the query should be grouped by the other Attributes. To do so, click on the menu button of the same Attribute and click on Add to group by.
The Query Designer sets the base view by default when an Entity is selected. To change to a non-base (alternative) view of a selected Entity, click on the menu button next to the Entity name in the Attributes pane. A list of non-base views will be displayed. The base view is marked with "(Main)". Select the required non-base view from the list. The attribute list will be updated with the attributes of the selected non-base view.