Query template settings
You can create a query template to filter the data that you will display on the dashboard. In particular, such a query template can be used as a Data Source of the dashboard widgets.
This is suitable if you have lots of data ingested in your project, coming from different sources.
For example, we will show you here how to create a query template that filters only for data coming from the simulator.
Proceed as follows:
On the left navigation, go to Data Explorer and click
Add Query Template in the upper right area.
In the Template Designer that opens, add a Name for the new template, for example Device simulator latest data.
In the Parameters area click
Add Parameter in order to add two parameters, namely:
Name: device with Data Type: STRING and Parameter Type: SCALAR
Name: timerange with Data Type: TIMESTAMP and Parameter Type: RANGE
In the Template Definition area enter a query. You can see an example on the screenshot below.
When ready, click the Create New Query Template button on the bottom.
As a final step, Run the template, to see if it is generating data. For that, you need to enter the ID of one of your devices.
The correct format of the device ID is the one that you can see on the list of devices under the device name:
You can find more information and examples on how to write a query template in our User Guide at Creating a query template.