Example
Last updated
Last updated
This example Application demonstrates how to read Australian sensor values via a query statement against an Azure SQL Database using the Azure SQL Connector.
You can download the files here to try it out for yourself - adjusting the steps to use your own Azure SQL credentials.
Refer to configuration to understand all configuration options of this Connector.
From the Properties blade of the widget to which the Azure SQL Connector will be linked, a data grid in our example, select the Data Source tab.
Click the plus icon next to Data Source and then the plus icon next to Connection.
Select the Azure SQL Connector and enter a name for the connection. In this case, set the name to "Master Data".
Enter the authentication details: the Server Instance, User Name, and Password. In this case, tick to use variables and use SQL server authentication as a password is needed.
Select the database, tick to specify a query, paste a query, and select the primary key.
In this case, select XCS Master, paste the query below, and select Id as the primary key.
Click Save.
Use the Connection that was just created, select the entity to read, and enter the Data Source name.
In this case, set the name to Master Data, set the Connection to Master Data, and the entity to SQL Query.
Save the Data Source.
Note: the primary key is auto-populated once the entity is selected.
Select the Data Source we just added.
Save the Application, and click the launch button to view the data grid.
Observe that Australian sensor values are returned using a query statement against an entity in an Azure SQL database.
See the Import, Export, and Clone - XMPro article for steps to import an Application.
Application
C0mp|ex123