Share via

Stream Analytics job does not stream the data to the database

Klajderic Aljosa HSLU I 55 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.

Azure Stream Analytics
Azure Stream Analytics

An Azure real-time analytics service designed for mission-critical workloads.

{count} votes

Answer accepted by question author
  1. Sander van de Velde | MVP 37,056 Reputation points MVP Volunteer Moderator
    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

1 additional answer

Sort by: Most helpful
  1. Klajderic Aljosa HSLU I 55 Reputation points
    2025-02-21T12:02:00.8666667+00:00

    Hi,

    sorry for the late reply and thanks for the help!

    0 comments No comments

Your answer

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