Examples

The following examples can be found on this page:

ADX Table

This example Application demonstrates how to read telemetry data from a table in an Azure Data Explorer instance using this Connector.

You can download the files here to try it out for yourself - adjusting the steps to use your own Azure credentials.

Refer to configuration to understand all configuration options of this Connector.

Step 1: Add the Connection

From the Properties blade of the widget to which the Azure Data Explorer Connector will be linked, a data grid in our example, select the Data Source tab.

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

Select the Azure Data Explorer Connector and enter a name for the Connection. In this case, set the name to "Azure Data Explorer Connector".

Step 2: Configure Server

Enter the authentication details: the Cluster Url, Tenant Id, Client Id, and Secret Key. In this case, tick to use variables.

Step 3: Configure Database

Select the database, table, primary key, and columns to return. In this case:

  • Database: TestDatabase

  • Table: TruckTelemetry table

  • Primary key: PumpId

  • Columns: ReadingNo, PumpId, PumpInletPressure, and Timestamp

If there is a need to select data from multiple tables, tick the Specify ADX Query option and provide the query in the ADX Query field.

Click Save.

Step 4: Use the Connection

Use the Connection that was just created to complete entering the new Data Source. In this case, set the name to "Azure Data Explorer Connector", and the entity to "TruckTelemetryTest".

Save the Data Source.

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

Step 5: Use the Data Source

Select the Data Source we just added, and save the Application.

Step 6: Results

Click the Launch button and view the results. Observe that telemetry data is returned from Azure Data Explorer.

Files

See the Import, Export, and Clone - XMPro article for steps to import an Application.

ADX Query with Parameters

This example Application demonstrates how to read telemetry data from an Azure Data Explorer instance using an ADX Query with Query Parameters.

You can download the files here to try it out for yourself - adjusting the steps to use your own Azure credentials.

Refer to configuration to understand all configuration options of this Connector.

Step 1: Add the Connection

From the Properties blade of the widget to which the Azure Data Explorer Connector will be linked, a chart 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 Data Explorer Connector and enter a name for the connection. In this case, set the name to "ADX Connection".

Step 2: Configure Server

Enter the authentication details: the Cluster Url, Tenant ID, Client ID, and Secret Key. In this case, tick to use variables.

Step 3: Configure Database

Select the Database, ADX Query, Primary Key, and Columns to Return. In this case:

  • Database: TestDatabase

  • ADX Query: StormEvents | where StartTime > queryparam("StartDate","DateTime","2007-01-01") | where State in (queryparam("StateList","Dynamic","'ALABAMA','INDIANA'")) | take queryparam("NumRecords","Int","100")

  • Primary key: StartTime

  • Columns: StartTime and DamageProperty

Click Save.

Step 4: Use the Connection

Use the Connection that was just created to complete entering the new Data Source. In this case, set the name to "Data", the connection to "ADX Connection", and the entity to "ADX Query".

Save the Data Source.

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

Step 5: Use the Data Source

Select the Data Source we just added.

Click the pencil icon next to Parameters to bind the query parameter values from the query entered in step 3.

Click the pencil icon next to Filter to enter criteria: 'DamageProperty' is less than 50000.

Apply the filter and save the Application.

Note: When query parameter values are not provided, the default values provided in the query are used.

Step 6: Configure Chart Data

Next, we'll add Data Series to the chart. Expand the Axes accordion, and set the X Axis' data type to Date Time.

In the Data accordion, click the plus icon next to Series. The series settings blade will open on the right. Set the name, color, X Axis Data, and Y Axis Data. In this case:

  • Name: Property Damage

  • Colour: Red

  • X Axis Data: Start Time

  • Y Axis Data: Damage Property

Click Apply and Close, and save the Application. Click the Launch button and view the chart.

Step 7: Results

Observe that the chart is populated with data from Azure Data Explorer.

Files

See the Import, Export, and Clone - XMPro article for steps to import an Application.

Last updated