0
votes

I'm beginner in Azure, I have created a Stream Analytics Job in Windows Azure. Here I'm using two Inputs in job, one is type of Event Hub and another is type of Blob Storage.

Below is the SQL Query for ASA Job (To store output in SQL Database) :

SELECT
    IP.DeviceId
    , IP.CaptureTime
    , IP.Value
    , [TEST-SAJ-DEMO-BLOB-Input].[DataType] AS TempVal -- Blob Storage Input
INTO
    [Test-Output-Demo] -- SQL Table to store output
FROM
    [TEST-SAJ-DEMO-Input] IP -- Event Hub Input

Below is JSON data in my Blob storage container (Blob Storage Input [TEST-SAJ-DEMO-BLOB-Input])

{"DataType":"DEMO"}

Everything is working fine except [TEST-SAJ-DEMO-BLOB-Input].[DataType] returns null instead of string 'DEMO'.

All data sent by Event Hub Input is storing into sql table and their is no error in process.

Any help is appreciated ...

2

2 Answers

1
votes

I was trying possible changes to resolve this issue and finally it's resolved.

It was Blob Storage Input [TEST-SAJ-DEMO-BLOB-Input] configuration mistake, In configuration Path Pattern I was defined, {date}{time}/Test_Demo.json now I have just changed it with simply Test_Demo.json and it works.

So the issue was in Path Pattern of Blob Storage Input ...

But I'm still not clear about Path Pattern (How 'Path Pattern' works?), why "{date}{time}/Test_Demo.json" was not working

0
votes

Is this just an alias issue? You've used IP as the FROM alias. But then used the full source name for the data type field. I know that in T-SQL this wouldn't matter.

Try:

SELECT
    IP.DeviceId,
    IP.CaptureTime,
    IP.Value,
    IP.DataType AS TempVal -- Blob Storage Input
INTO
    [Test-Output-Demo] -- SQL Table to store output
FROM
    [TEST-SAJ-DEMO-Input] IP -- Event Hub Input

Also check the input for the stream job is set for JSON encoding.