【发布时间】:2021-06-05 00:28:13
【问题描述】:
我正在尝试将 json 文件引入 kusto(.zip 文件),并使用更新策略进一步处理 json
Approach 1 :file has following contents
{
"id": "id0",
"logs": [
{
"timestamp": "2021-05-26T11:33:26.182Z",
"message": "test message 1"
},
{
"timestamp": "2021-05-26T11:33:26.182Z",
"message": "test message 1"
}
]
}
.create table test (
logs : dynamic
)
.create-or-alter table test ingestion json mapping 'testmapping'
'['
'{"column":"logs","path":"$.logs","datatype":"","transform":"None"}'
']'
.ingest into table test(
h@"sasUrlfromazureBlob"
)
with (
format = "multijson",
ingestionMappingReference = "testmapping",
zipPattern = "*"
)
上面是在一行中摄取整个日志数组,但我希望它扩展到多行
方法二:
Input file conatains:
[
{
"timestamp": "2021-05-26T11:33:26.182Z",
"message": "test message 1"
},
{
"timestamp": "2021-05-26T11:33:26.182Z",
"message": "test message 1"
}
]
.create table test (
logs : dynamic
)
.create-or-alter table test ingestion json mapping 'testmapping'
'['
'{"column":"logs","path":"$","datatype":"","transform":"None"}'
']'
Above 很好地将日志扩展为多行(本例中为 2 行) 但是当我从一个对象(Approach1)中选择数组时,它会转储到单行中,问题是,它对于动态数据类型有 1MB 数据的限制
【问题讨论】:
标签: json azure-blob-storage azure-data-explorer data-ingestion ingest