Overview
The Dataset module offers powerful configuration options for managing queries efficiently. Users can define queries with custom names, select database configurations, and input SQL statements, including Tag embedding. Mapping options enable data population from query results, and users can specify time references (UTC or Local) for Date Time fields.
In addition, the Dataset module allows users to display query results using Data Grids in screens and dashboards, simplifying data visualization. Query results can also trigger actions in custom scripts and tags, enhancing automation capabilities for notifications and tag updates. For more advanced functionalities, users can explore Stored Procedures.
On this page:
Table of Contents | ||
---|---|---|
|
Queries
To create and configure a Dataset Query, follow the steps below.:
- Access Datasets → Queries.
- Click the plus icon.
Enter a Name and Description for the Query, and click
Click Ok.
Info The use of spaces is not allowed in the Name. Instead, use underscores. For example : My_Query
In the list of Dataset Queries, double.
You can modify the Query settings after its creation. Double-click the property you wish to edit on the row corresponding to the
tableQuery you want to modify.
Queries configuration properties in the Dataset module enable users to create and manage data retrieval queries efficiently. The following table lists all possible configuration properties:.
Column | Description |
---|---|
Name | Enter a name for the queryThe Query's name. The system allows will warn you to know if the name is not validif you choose an invalid name. |
DB | Select Defines the database configurationwhere the Query will be executed. |
Sql Statement | Enter Specify the query Query using SQL syntax. You can embed tags Tags directly on the SQL statement, embracing the tag with curly brackets. For example, ColumnName = {tag.tagInt}. Alternatively, you can update the SQL Statement with the Script Module module accessing the property property Dataset.Query.QueryName.SqlStatement. When doing so, if If you access that property from multiple tasks using this approach, be aware of potential concurrency issues. For advanced more information on that, refer to the page , access Advanced Dataset Guide. |
Mapping | Click the three dots button (...) to select the tags that you want to populate with data from specific columns returned by the queryQuery returns. |
Mapping Date Time | Select Defines the time reference (UTC or Local). |
Description | Enter a description for the table configurationQuery's description. |
Showing Data Grids Tables On Displays
One of the critical features of the Dataset module is the ability to display query Query results on screens and dashboards using visualization tools like DataGridsData Grids. To use Data Grids to display query results, follow these steps:
- Create a Query in the Dataset module to retrieve the desired data. Refer to the previous section to learn how to create a Query.
- In the Displays Modulemodule, add a Data Grid control to the screen or dashboard.
- Configure the Data Grid to display the Query results by selecting the data source and column mappings.
- Save and preview the screen or dashboard to display the Query results on the Data Grid.
Check You can access the Displays and Visualization page for more information on how to configure configuring Displays.
Using Query Results On Scripts And Tags
You can use query Query results to trigger actions in custom scripts and tags. To do so, use this kind of automation, you need to follow the steps below:
- Create a Query in the Dataset module to retrieve the desired data. Refer to the previous section to learn how to create a Query.
- In the Scripting Modulemodule, create a custom script that references the Query results.
- Use the Query results to trigger specific actions within the script, such as sending notifications or updating tags.
- Save and execute the script to perform the desired actions.
Check the Stored Procedures page for additional information.
In this section...
Page Tree | ||||
---|---|---|---|---|
|