Azure Stream Analytics Test Query Does not work correctly with "WITH" clauses

Ulla Jutila 0 Reputation points
2023-10-02T06:32:13.2633333+00:00

Here is my query:

WITH 
Stage1 AS
(
SELECT
    records.ArrayValue.time as Recordedtime,
    records.ArrayValue.properties.flows as flows
FROM
    [insights-logs-networksecuritygroupflowevent] as n
    CROSS APPLY GetArrayElements(n.records) AS records
),
Stage2
AS
(
SELECT 
    s.Recordedtime AS yy,
    GetArrayElement(s.flows,0) AS xx 
FROM Stage1 s
)
SELECT 
    * 
INTO
    [uustolearningoutput]
FROM Stage2

This is what I get when using "Test query" functionality:

asa_bug

This is what I get when I actually run the query:

enter image description here

So the query testing is not working correctly, why?

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