Is it possible to explode JSON array on ingestion stage?

Viewed 170

Azure Data Explorer is receiving data through Event Hub subscription. The payload is compressed JSON of the type:

{
  "foo": "bar",
  "why": 42,
  "data": [
    {"field1": "abc", "field2": 123},
    {"field1": "xyz", "field2": 456},
    {"field1": "pqr", "field2": 789}
  ]
}

I need to convert data into tabular format:

filed1 field2
-------------
abc    123
xyz    456
pqr    789

or even better:

foo    why    field1 field2
---------------------------
bar    42     abc    123
bar    42     xyz    456
bar    42     pqr    789

I need to create an ingestion mapping, which is a case of data mapping. Looking at the path syntax, I cannot figure out how to create such a mapping.

Is it possible? If not, what is the best way to set up such a transformation during ingestion?

1 Answers
Related