3

I have issue with stream analytics query UNION operation result.

The following query if part one has no rows return, part two has 5 rows return, the UNION suppose to return 5 rows as result, but it return nothing.

SELECT EventKey, Events.ACP.EventType, Event.ACP.Details, NULL Involved FROM Input1
WHERE Events.ACP IS NOT NULL

UNION

SELECT EventKey, Events.MED.EventType, Event.MED.Details, Event.MED.Involved FROM Input1
WHERE Events.MED IS NOT NULL

Run each query will have correct number of result, but after union operation return nothing.

Regards

frank
  • 31
  • 2

1 Answers1

1

Union will produce a result for time stamp T only after both sides of the union reaches at least T. If one of the sides does not have data, then this will be controlled by your late arrival policy. Output should be produced after late arrival window.

Vignesh Chandramohan
  • 1,306
  • 10
  • 15
  • 1
    did you get this working? I'm running into the same problem, but can't get it to work: https://stackoverflow.com/questions/69823365/no-output-when-one-side-of-union-is-empty – Leon Cullens Nov 03 '21 at 11:20