Example
Last updated
Last updated
This Data Stream example demonstrates how to use this Reader to retrieve the last five telemetry readings from an Azure Data Explorer table for a pump (Pump B-005) supplied by a prior Agent.
Refer to configuration to understand all configuration options of this Agent.
Drag the Azure Data Explorer Reader onto the canvas, link the input endpoint to the pump id, and the output to the printer. Rename it and save the Data Stream.
Select the Agent and click Configure. In this case, keep the default Collection.
Enter the authentication details: the Client Id, Secret Key, and Tenant Id. In this case, select ADX Client ID, ADX Secret Key, and ADX Tenant ID respectively.
Enter the Cluster Url.
Select the Database, Table, and Columns To Return.
In this case, set Database to showcase, keep the Specify ADX Query as unticked, set the Table to PumpTelemetryData, and select the PumpId, Timestamp, MotorCurrent, PumpSuctionHead, InletPressure, DischargePressure columns.
Add the Limit Rows By, Filters, and Sort By criteria.
In this case, select Limit Rows By to Number of Rows and then set Number of Rows to 5.
Add Filters and set the Column to PumpId, keep the Operand as '==' and set Mapping to PumpId.
Add Sort By and set the Column to Timestamp and the Order to Desc.
Apply the changes, save the Data Stream, and publish it.
Let's look at the Live Data View. Observe that the last five readings on Pump B-005 is printed every 10 seconds.
See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.
Data Stream
C0mp|ex123
Sample Data