Query Designer Capabilities¶
- Selecting Entities and Attributes
- Basic Filter
- 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 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 check mark 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.
A basic filter can be applied to any selected Attribute. Click on the menu button of the Attribute in the Preview 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 Preview 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 individual attribute level. Each condition will be joined with an AND operator.
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 Preview 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 on the Preview pane.
To set an alias to a selected Attribute click on the menu button next to the relevant Attribute's name in the preview pane. Click on Alias. Type in the alias and click Apply. The alias will be displayed on the Preview 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 warn the user and will not add the Entity into the query.
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 an aggregation to a selected Attribute, click on the menu button next to the relevant Attribute's name in the preview pane. Click on Aggregate and select the 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 an non-base (alternative) view of a selected Entity, click on the menu button next to the Entity name in 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 selected non-base view.