TSA SQL Server Connector
  • TSA SQL Server Connector
  • How to use?
    • Example
    • Configuration
Powered by GitBook
On this page
  • Step 1: Add the Connection
  • Step 2: Configure Server
  • Step 3: Configure Database
  • Step 4: Use the Connection
  • Step 5: Use the Data Sources
  • Step 6: Results
  • Files
  1. How to use?

Example

PreviousTSA SQL Server ConnectorNextConfiguration

Last updated 8 months ago

This example Application demonstrates how to read asset telemetry data, the average motor current for pump 1, from a SQL Server Database using the TSA SQL Server Connector.

Refer to to understand all configuration options of this Connector.

Step 1: Add the Connection

From the Properties blade of the Time Series Chart, select the Data Source tab.

Click the plus icon next to Data Source and then the plus icon next to Connection.

Select the TSA SQL Server Connector and enter a name for the connection. In this case, set the name to "TSA SQL Connection".

Step 2: Configure Server

Enter the authentication details: the Server Instance, User Name, and Password. In this case, tick to use SQL Server authentication as a password is needed.

Step 3: Configure Database

Select the database and click Save.

Step 4: Use the Connection

Select the Connection that was just created, enter the Data Source name, and select the entity to read. In this case, set the name to Chart Data and the entity to SimpleChart. Save the Data Source.

Note that the primary key is auto-populated once the entity is selected.

Repeat the above step to add another TSA SQL Data Source for the Hierarchy. In this case, set the name to Chart Hierarchy and the entity to SimpleTree. Save the Data Source.

Step 5: Use the Data Sources

Select the Data Sources we just added, configure the Block properties and save the Application.

Click the launch button to launch the application.

In this case, use the following values:

Accordian
Property
Value

Data Source

Data Source

Chart Data

Data

Timestamp Expression

Timestamp

Hierarchy

Group By Asset

Ticked

Hierarchy

Asset Id Expression

Id

Hierarchy

Show Hierarchy

Ticked

Hierarchy

Data Source

Chart Hierarchy

Hierarchy

Id Expression

Id

Hierarchy

Name Expression

Text

Hierarchy

Parent Id Expression

Parent

Hierarchy

Resource Expression

IsResource

Step 6: Results

Select the asset telemetry data from the hierarchy that we want to display. In this cased select Mine 1 Dropdown, then Select Area 1 Dropdown, then Pump 1, then Motor Current, and then select Apply.

Observe that the average motor current data is returned from the SQL Server database for the selected period.

Files

File
Link
Security Key

Application

C0mp|ex123

See the article for steps to import an Application.

Import, Export, and Clone - XMPro
configuration
TSA SQL Connector Example.xapp
Step 1: Add the Connection
Step 1b: Add the Connection 2
Step 2: Configure Server
Step 3: Configure Database
Step 4: Use the Connection
Step 4b: Use the Connection 2
Step 5a: Use the Data Sources
Step 5b: Use the Data Sources 2
Step 6a: Results - criteria selection
Step 6b: Results - output