Currently I'm visualizing data in Grafana from Azure IotHub to Stream analytics to a SQL database.
I'm able to read and visualize the data but it is showing the affected row's last data. Later the new data is not updating in table; only limited rows of data exist, but stream analytics is still sending new data to the database.
What would be the cause and from Grafana's side? I gave the 5s refresh for each panel. Is there any way to refresh the table for new data or continuously update the table?
In stream analytics the query is:
SELECT
data1,
data2,
data3
INTO
database_name
FROM
Hub_name
SELECT *
FROM table_name
Steps to send data from Azure IotHub using Stream analytics to a SQL database:
Create Event Hubs Namespace:
Save Connection String:
Create Event Hub:
Code taken from DOC andDOC2.
Configure Event Hubs as Data Export Destination:
Create Data Export:
Create Stream Analytics Job:
. Add Stream Input:
After the Stream Analytics job is created, go to the Overview page. - Select the arrow link for Inputs. - Choose Event Hub as the stream input type. - Provide details for the Event Hub, including the namespace and Event Hub name. - Click "Save."
Create Azure SQL Database:
Add Stream Output:
Go back to the Stream Analytics job.
Go to the Outputs link.
Select SQL Database as an output type.
Provide details for the SQL database, including the table name.
Click "Save."
Define SQL Table:
Ensure that the SQL table (e.g., t1) is already created in the Azure SQL database.
Edit Stream Analytics Query:
Press on the Edit Query link in the Stream Analytics job.
Modify the SQL query to retrieve details from the telemetry data.
Test the query and save it.
. Start Stream Analytics Job:
Press the Start button in the Stream Analytics job. -. Monitor Stream Analytics Job:
Check the Stream Analytics job Monitoring to understand how data streams are transferred from the input Event Hub to the output Azure SQL Database.
. Verify SQL Table:
Check the SQL table to verify how streams of telemetry data are getting populated in the SQL Database.