locked
json ingestion RRS feed

  • Question

  • Hi,

    I have an JSON on event hub like this:

    {
    "events": {
    "deviceID": "123",
    "eventName": "Order",
    "OrderId": 1000,
    "Total": 1500,
    "entrytime": "2017-11-06T03:34:00Z"
    }
    }

    I am trying to consume the JSON on Azure Stream Analytics: 

    SELECT
        deviceID,
        SUM(Total) AS TotalValue
    INTO outputblob
    FROM
        readfromeventhub TIMESTAMP BY entrytime
    GROUP BY
        deviceID,
        HoppingWindow(second, 10,5)

    This gives an error saying field entrytime not found. field events found.

    Please advise.

    thanks

    MS

    Monday, November 6, 2017 3:52 AM

Answers

  • Hi, 

    try to put events in front of all columns.

    e.g. events.entrytime 

    Regards 

    Thomas 

    • Marked as answer by MS_Prog Monday, November 6, 2017 11:06 PM
    Monday, November 6, 2017 3:41 PM