Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 DateTime Date Time fields.

Additionally, the Dataset module allows users to display query results using DataGrids 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
maxLevel3


Queries

 To create and configure a Dataset Query follow the steps below.

  1. Access Datasets Queries.
  2. Click the plus icon.
  3. Enter a Name and Description for the Query, and click Ok.

    Info

    The use of spaces is not allowed in the Name. Instead, use underscores. For example: My_Query

  4. In the list of Dataset Queries, double-click the property you wish to edit on the row corresponding to the table you want to modify.

Queries configuration properties in the Dataset module enable users to create and manage data retrieval queries efficiently. Key fields include:

Dataset Query Configuration Properties  

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.

SqlStatementSql Statement

Enter the query using SQL syntax. You can embed tags directly on the SQL statement, embracing the tag with curtly curly brackets. E.g. "For example, ColumnName = {tag.tagInt}".

Alternatively, you can also update the SQLStatement SQL Statement with the Script Module accessing the property property Dataset.Query.QueryName.SqlStatement. When doing so, if you access that property from multiple tasks, be aware of potential concurrency issues, for . For advanced information on that, refer to the page 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.

MappingDateTimeMapping Date Time

Select the time reference (UTC or Local).

Description

Enter a description for the table configuration.

Showing

DataGrids

Data Grids Tables

on

On Displays

One of the key critical features of the Dataset module is the ability to display query results on screens and dashboards using visualization tools like DataGrids. Here are some steps for using DataGrids To use Data Grids to display query results, follow these steps:

  1. Create a
  2. query
  3. Query in the Dataset module to retrieve the desired data. Refer to the previous section to learn how to create a Query.
  4. In the Displays Module, add a
  5. DataGrid
  6. Data Grid control to the screen or dashboard.
  7. Configure the
  8. DataGrid
  9. Data Grid to display the
  10. query
  11. Query results by selecting the data source and column mappings.
  12. Save and preview the screen or dashboard to display the
  13. query
  14. Query results on
  15. the DataGrid
  16. the Data Grid.

Check the Displays and Visualization page for more information on how to configure Displays.

Using Query Results

on

On Scripts

and

And Tags

Users You can use query results to trigger actions in custom scripts and tags. Here are some steps for using query results in scripts and tags:To do so, follow the steps below.

  1. Create a query Query in the Dataset module to retrieve the desired data. Refer to the previous section to learn how to create a Query.
  2. In the Scripting Module, create a custom script that references the query Query results.
  3. Use the query Query results to trigger specific actions within the script, such as sending notifications or updating tags.
  4. Save and execute the script to perform the desired actions.

Check the Stored Procedures page for additional information.


In this section...

Page Tree
root@parent
spacesV10