Creating a query
How to create queries in Data explorer
When you open Data explorer using the right menu panel, you are presented with no tabs and you need to add a tab to start exploring your data. A tab represents an individual query and displays the results of the query within the tab. You can add multiple tabs, where each one is a different query.
Creating a query
To create a query directly within Data explorer you need define the context by selecting a design or interface. For example if you want to view information about street lights you would select a design that the street lights are related to. To select a design or interface use the following procedure:
- Select the Add tab button at the top of the explorer window.
- A dialog is displayed that allows you to select a design or interface that your query is based on.
Selecting an interface will result in a list of all items related to all the designs that link to the interface you have selected. This can result in a very large data sample, for example selecting the Assets interface will list all assets within the system. For smaller data samples you should use designs.
- When you have selected an interface or design a list of related items is displayed in the first column. The total number of items is indicated at the top of the column.
At this stage there is no additional data displayed. To view more information about the items that you have listed you need to add some attributes.
When you open Data explorer from the Search bar or using the option in the Action bar then you have already pre-selected the design or interface. The list of items resulting from your search or Item details panel are transferred to the Data explorer.
In this example selecting the street lights design has produced a list of items related to the design that is transferred to Data explorer and forms the context of the query.
In this example the Defects tab contains a list of defects related to a selected street light, this list is transferred to Data explorer and forms the context of the query.
Adding attributes allows you view additional data related to the list of items that you have selected and expand the scope of the query. Data explorer uses the Pathfinder tool to allow you to select attributes to display data, see Pathfinder.
Select add some attributes from the header bar to access the Pathfinder tool. This option only allows you to add attributes initially.
Alloy also provides you with a quick attribute link, which you can use if it is relevant.
When you have selected the attributes the results are displayed in the tab.
Regular attributes display data, link attributes indicate the number of possible results. You can select the link attribute results to open a new tab and view the results within the link attribute.
You can view the query code for a tab by opening the AQS Builder.