Stream Analytics job does not stream the data to the database

Klajderic Aljosa HSLU I 0 Reputation points
2025-01-17T14:57:57.25+00:00

I have a Python script that sends data to the IoT Hub using MQTT. A message routing configuration is set up to route the data to a Blob storage, and this part is working as expected—I can see the data in the storage.

My next goal is to route the data to a database. To achieve this, I created and connected the input, query, and output in Stream Analytics. I also tested the connections and verified the query.

User's image

Here is the query I tested:

User's image

However, after checking the database, I found it empty. Only one row has been created.

User's image

What am I missing here?

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,226 questions
Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
373 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 34,281 Reputation points MVP
    2025-01-17T22:59:46.1466667+00:00

    Hello @Klajderic Aljosa HSLU I ,

    welcome to this moderated Azure community forum.

    You connect the Stream Analytics job via the 'eventhub compatible endpoint' of the Azure IoT Hub.

    And you added a custom route for the blobs.

    By adding that route, you triggered a 'side effect', that eventhub compatible endpoint turns into a fallback route scenario:

    User's image

    The solution is easy:

    User's image

    Just add an extra (second) route for the build-in endpoint and you have your flow back:

    User's image

    Check the text on the message routing about more details.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.