Query Bar
The query bar is present in all reports and allows you to restrict the assets in scope for the report.
Getting started
The query bar is a useful tool for filtering the repository and graphical reports. Complex queries can be formulated easily (e.g. for filtering and searching for specific assets).
A query can contain multiple blocks that look similar to the following:
Most query blocks have some sort of configuration, such as the Add operation above - the example was configured to only add assets that are of the type is Application. Each query block operates on the previous query result. If you start off with an empty query bar in a report, this result can also be empty. Based on the query result, one can now navigate links between assets:
The result of this query containing two blocks are now all applications (Type is Application) and the neighbours of all applications (Add neighbours). Note that also the Add neighbours query had a configuration option: differentiating between incoming, outgoing or both link directions. When formulating a query, you are always presented with the possible options for each operation. Once you get to know the query language better, it is typically very quick to simply start typing the property you want to query and hit enter as soon as the presented options have narrowed down sufficiently:
Additive vs. subtractive queries
Conceptually, it is important to distinguish between "additive" and "subtractive" queries. Additive queries start with an empty result and by adding blocks one proceeds to increase the result set. On the other hand, subtractive queries start with a result set that includes all assets and proceed to remove unwanted assets by applying filters. The repository is the only "report" with an implicit "add all" block and is hence subtractive; therefore, it is possible to start filtering right away. All other reports are additive - they are created from scratch and one has to explicitly add assets to be included in the result set.
Usage examples:
Querying for the name of an asset
In the repository, just type in the desired name and hit ENTER. When creating a new report, the same query starting with an Add operator can be used. Alternatively, you can simply use the search bar when searching for a specific name.
Querying for a specific property
- In the repository, start typing the first characters of the desired property. The available properties containing the typed characters will be displayed in the dropdown menu.
- Select the desired property with the arrow keys and then hit ENTER.
- Then use the DOWN button on the keyboard to select the operator like "contains".
- Enter the desired property value and hinter ENTER to complete the query and execute the filter.
- You can also concatenate queries with OR. When creating a new report, the same query starting with an Add operator can be used.
Querying for all assets of a specific type
Type Type into the query bar and then select it from the dropdown menu. Then use the DOWN key of the keyboard to select the is operator and hit ENTER. After that use the DOWN key to select the desired asset type and hit ENTER to execute the query. In the repository, the same query can be used without the Add operator at the beginning.
Find assets not edited in the past 24 hours
Assets that haven't been modified in the past 24 hours have a LastModifiedDate
value lower than the time 24 hours ago.
Therefore, the < operator must be used for this operation.
Of course, using the > operator will also work and result in the opposite query:
"Which assets HAVE been modified in the past 24 hours".
Start typing LastModifiedDate
and select it from the dropdown menu.
Proceed to select the operator <.
You can use relative date descriptions such as past 24 hours, past 7 days and so on.
The query bar will automatically parse the selected input and display it as a query block if it found the input to be valid:
For more information about which values can be understood by the query bar, please refer to the command "Property number/datetime value match" in the table below.
Using Select in dependency/tree reports
Only using the Select command alone does not lead to visual changes, as it only defines which assets are considered for the following command. Assuming, there is an application that has multiple neighbors: load balancers, databases, a migration wave and stakeholders. The goal is to add the application, its neighbors and the neighbors of the databases, but not of the other assets. Here, Selectcan be used:
Query bar capabilities
The following two tables explain all available commands in the query bar. In the following table the generic commands are described in more detail.
Generic commands
Command | Description |
---|---|
Add | Add assets to the result or report. |
Remove | Remove assets from the result or report. |
Filter | Filter assets from the result or report. |
Select | Select assets from the result or report. |
All | Operate on all assets in the repository (when combined with Add) or on all assets in the report (when e.g. combined with Filter). |
Or | Combine multiple criteria for the Filter operation. |
Property text value match
| Checks if a property matches a specified text value. The property filters are listed below.
|
Property value is empty
| Checks if a specified property value is empty. The property filters are listed below.
|
Property number/datetime value match
| Checks if a property matches a specified number value. The property filters are listed below.
For datetime values relative datetime offsets can also be used with the following keywords: (Available starting from version 9)
Instead of "day" you can use "year", "month", "week" or "hour". |
Property number value is set
| Checks if a property has a set number value. The property filters are listed below.
|
Property datetime range value match
| Checks if a property matches a specified datetime range. The property filters are listed below.
|
Property datetime range value is set
| Checks if a property has a set datetime range value. The property filters are listed below.
|
Name contains | Quick name-contains filter. |
Source | Allows querying for the information source of an asset. E.g. find all assets that have been imported by a given importer. |
Dependency/tree report commands
In the table below, the commands navigating the database via links are described in more detail.
Command | Description |
---|---|
Neighbors | All neighbors of the selected assets. |
Neighbors via | All neighbors of the selected assets reached via a certain association. |
Neighbors via property text match
| All neighbors via property matches a specified text value. The property filters are listed below.
|
Neighbors via property empty
| All neighbors where a specified property value is empty. The property filters are listed below.
|
Neighbors via property number match
| All neighbors where a property matches a specified number value. The property filters are listed below.
|
Neighbors via property number is set
| All neighbors where a property has a set number value. The property filters are listed below.
|
Neighbors via property datetime range value match
| All neighbors where a property matches a specified datetime range. The property filters are listed below.
|
Neighbors via property datetime range value is set
| All Neighbors where a property has a set datetime range value. The property filters are listed below.
|
Path class
|
|
Queries on multi-valued properties
While querying single-valued properties (e.g. Name contains Server) is fairly self-explanatory, queries on multi-valued properties have special semantics. The basic principle is:
- If a query is targeting a multi-valued property, it will check each value individually, and
- if any of the values matches the query, the asset as a whole matches the query.
However, depending on the predicate you select, there are exceptions:
Predicate | Semantics |
---|---|
is set | Will be evalued on the list of values as a whole. Will only match if the list of property values contains at least one value. |
is not set | Will be evaluated on the list of values as a whole. Will only match if the list of property values is empty. |
All other predicates (e.g. is, greater than, contains...) are evaluated on a per-value basis (see example below).
Example: uiLanguages
Let's assume that we have a list of applications, and each application has a multi-valued uiLanguages
property, containing the languages available on the user interface.
Query: uiLanguages is English
Asset | uiLanguages | Language matches? | Asset matches? |
Application 1 | [German, English, French] | German | |
English | |||
French | |||
Application 2 | [Spanish, Italian] | Spanish | |
Italian | |||
Application 3 | [German] | German | |
Application 4 | [English] | English | |
Application 5 | [ ] | (no data) |
The query uiLanguages is English, therefore, returns Application 1
and Application 4
.