Reputation: 169
What is the difference between JSON and MULTIJSON data format? Isn't it all a JSON? When should we use one or the other? How should the payload look when using one or the other?
Upvotes: 1
Views: 793
Reputation: 25955
Azure Data Explorer supports two JSON file formats:
json: Line separated JSON. Each line in the input data has exactly one JSON record.
multijson: Multi-lined JSON. The parser ignores the line separators and reads a record from the previous position to the end of a valid JSON.
and: https://learn.microsoft.com/en-us/azure/data-explorer/ingestion-supported-formats
JSON: A text file with JSON objects delimited by
\n
or\r\n
. See JSON Lines (JSONL).MultiJSON: A text file with a JSON array of property bags (each representing a record), or any number of property bags delimited by whitespace,
\n
or\r\n
. Each property bag can be spread on multiple lines. This format is preferred overJSON
, unless the data is non-property bags.
you should choose according to how your source data is formatted. if in doubt, choose multijson
, as it 'contains' json
.
example for json
with 2 records:
{"Hello":"World"}
{"Foo":{"Bar":"x"}}
example for multijson
with 2 records:
{
"Hello": "World"
}
{
"Foo": {
"Bar": "x"
}
}
Upvotes: 2