Search code examples
azure-stream-analytics

Azure Stream Analytics Job generates no output when using static reference data


I have written a query that uses a stream input and join it with static json reference data. I get the correct results when testing the query in "Test results" tab (uploading the same sample reference data). However, no output is generated when starting the job.

My query:

enter image description here

The stream input produces random results every second like :

enter image description here

And the json reference file is:

enter image description here

From the monitoring dashboard there are also no input events nor output.

I have confirmed that the output blob is created when no join with reference data is used in the query. I have uploaded the json reference data in a storage container and have provided the path pattern : ref/Atm.json in my example.

Thanks for any help.


Solution

  • I was just curious and tried to repro , I am using a very similar query as yours .

    SELECT sum(A.amount),B.area_code
    INTO Gen2
    FROMEHInput A
    JOIN JSONref B ON A.ATMCode=B.atm_code
    group by B.area_code,TumblingWindow(minute,1)
    

    This is the output which you have.( all junk data , but it confirms query works )

    {"sum":63580.0,"area_code":20}

    {"sum":73060.0,"area_code":30}

    {"sum":68220.0,"area_code":20}

    At this point , I thought to making some changes to check if I can repro your case of no output , I just updated the static file to something non existing file , ASA never complained about that but I never got the results either . I think you may be hitting the same ( as you mentioned that without the join things just works fine ) . In my case I have the static file location something like

    https://blobaccount.blob.core.windows.net/container/**File2/Atm.json**

    and when i create the Reference Input , I pass the file name as

    enter image description here

    I think for some reason its getting messed up here .

    Other thing which you can try it increase the TW to a bigger window .

    Let me know how it goes .