Azure 数据资源管理器数据连接数据格式

Azure Data Explorer Data Connection DataFormat

JSON 和 MULTIJSON 数据格式有什么区别?不都是一个JSON吗? 我们什么时候应该使用一个或另一个? 使用其中一种时,有效负载应该如何显示?

请看:https://docs.microsoft.com/en-us/azure/data-explorer/ingest-json-formats?tabs=kusto-query-language#the-json-format

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.

和:https://docs.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 over JSON, unless the data is non-property bags.

您应该根据源数据的格式进行选择。如有疑问,请选择 multijson,因为它 'contains' json.

具有 2 条记录的 json 示例:

{"Hello":"World"}
{"Foo":{"Bar":"x"}}

具有 2 条记录的 multijson 示例:

{
   "Hello": "World"
}
{   
    "Foo": {
       "Bar": "x"
    }
}