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?
1 Answers
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://docs.microsoft.com/en-us/azure/data-explorer/ingestion-supported-formats
JSON: A text file with JSON objects delimited by
\nor\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,
\nor\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"
}
}