Azure SQL DB not returning correct results

Woebbeking, William K 0 Reputation points
2025-03-03T15:19:12.8+00:00

Hello All,

I have a stream analytics job that is left outer joining an event hub dataset and a sql db reference table. When I left outer join the datasets, the result returns null:

JoinTable

You can see the result in the picture. The column called LEDT should return the datetime of the data from the left outer join. It does not consistently. If you see the row below, it works as intended. What I am noticing is the dataset is only returning a small amount of the data. The row count should be something like 1200 rows in the reference data. But the result set is only returning 50 rows. I have messed with the streaming units, to no avail. I also thought maybe it was just a result of a small sample dataset being returned for rendering issues. Even though I know 1200 rows is not a lot of data. I have also tried to add the dataset with a csv to a storage account, but that also does not seem to work.

Here's a snapshot of the left outer join:

LeftOuterJoin Again, I don't think it's an issue with the left outer join or else the second row wouldn't return correctly.

Any thoughts on the issue and a fix?

Thanks in advance!

Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
384 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,271 Reputation points Microsoft Employee
    2025-03-05T12:00:24.34+00:00

    Woebbeking, William K ,

    Left outer join specifies that all rows from the left table not meeting the join condition are included in the result set, and output columns from the other table are set to NULL in addition to all rows returned by the inner join.

    Azure Stream Analytics supports both inner join (the default) and LEFT outer join. For an inner join, a result is only returned when a match is found. But for a LEFT OUTER join, if an event from the left side of the join is unmatched, a row with NULL for all the columns of the right row is returned. For instance, here is an example to find the absence of events.

    Reference: https://learn.microsoft.com/en-us/stream-analytics-query/join-azure-stream-analytics

    Hope it helps. Kindly accept the answer by clicking on Accept answer button. Thankyou

    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.