无法将对象数组或csv文件中的数据插入kusto表中
我的目标是在Azure DevOps中建立一个管道,该管道使用PowerShell读取数据并将数据写入Kusto表。
我能够将从PowerShell中读取的数据写入对象Array或csv文件,但无法弄清楚将这些数据插入Kusto表的方式。
任何人都可以提出将数据写入kusto的最佳方法
答案 0 :(得分:1)
一种选择是将CSV有效负载写入blob存储,然后通过以下方式将该blob提取到目标表中:
readLine
或IngestFromStream
的方法,这些方法可以将数据写入中间Blob存储中,从而使您不必或通过
IngestFromDataReader
命令:https://docs.microsoft.com/en-us/azure/kusto/management/data-ingestion/ingest-from-storage。尽管不建议将“方向摄取”用于生产量另一个选项(不建议用于量产),将使用.ingest
(又称“最大推送”)选项:https://docs.microsoft.com/en-us/azure/kusto/management/data-ingestion/ingest-inline
例如:
.ingest inline
它将上面的记录追加到表中:
.create table sample_table (a:string, b:int, c:datetime)
.ingest inline into table sample_table <|
hello,17,2019-08-16 00:52:07
world,71,2019-08-16 00:52:08
"isn't, this neat?",-13,2019-08-16 00:52:09