How to specify json mapping for Data from EventHub RRS feed

  • Question

  • Hi,

    I have built a program which gets data from a streaming feed and then sends it to Azure Event Hub. The data is in a json which consists of many keys and they are dynamic, meaning they may not appear in the feed if the data in that key is not there.

    Now, I have been trying to see if we could analyze the raw data in the event hub and therefore zeroed in on the Azure Data Explorer. I have created a table in there, with just one field , which is of type "dynamic", where I intend to store the entire json.

     I have gone through the quick start tutorial on MSDN and the sample application mentioned here: https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-event-hub

    But the problem is , in that sample, it is breaking the entire json to the the individual elements. I, on the other hand, want to ingest the entire json. So, question is - why is the below not working? When I look at the count of the table after pushing data to event hub it stays at 0. I also do not know if there is a log somewhere , so that I can check what's wrong.

    .create  table StreamDump (RawData : dynamic)
    .create  table StreamDump ingestion json mapping 'StreamMapping' '[{"column":"RawData","path":"$..","datatype":"dynamic"}]'

    The eventhub has the data.

    Thursday, December 13, 2018 2:11 PM

All replies

  • Nervermind, it works now :). The jsonpath was wrong it seems. 

    .create  table StreamDump ingestion json mapping 'StreamMapping' '[{"column":"RawData","path":"$","datatype":"dynamic"}]'

    But I had to figure it out. Isn't there a log somewhere where I could have seen it?

    Thursday, December 13, 2018 2:53 PM