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.
Additionally, 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:
To create and configure a Dataset Query follow the steps below.
Enter a Name and Description for the Query, and click Ok.
The use of spaces is not allowed in the Name. Instead, use underscores. For example: My_Query |
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 query. The system allows you to know if the name is not valid. |
DB | Select the database configuration. |
Sql Statement | Enter the query using SQL syntax. You can embed 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 accessing the property Dataset.Query.QueryName.SqlStatement. When doing so, if you access that property from multiple tasks, be aware of potential concurrency issues. For advanced information on that, refer to the page 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 query. |
Mapping Date Time | Select the time reference (UTC or Local). |
Description | Enter a description for the table configuration. |
One of the critical features of the Dataset module is the ability to display query results on screens and dashboards using visualization tools like DataGrids. To use Data Grids to display query results, follow these steps:
Check the Displays and Visualization page for more information on how to configure Displays.
You can use query results to trigger actions in custom scripts and tags. To do so, follow the steps below:
Check the Stored Procedures page for additional information.