无法将来自对象数组或csv文件的数据插入kusto表
我的目标是在Azure DevOps中构建一个管道,它使用PowerShell读取数据并将数据写入Kusto。
我能够将从PowerShell读取的数据写入object或csv文件,但无法找到将这些数据插入Kusto表的方法。
有谁能建议将数据写入库斯托的最佳方法吗?
发布于 2019-08-16 00:56:17
一种选择是将CSV有效负载写入blob存储,然后通过以下方式将该blob摄入到目标表中:
IngestFromStream或IngestFromDataReader的方法,它们处理将数据写入中间blob存储的过程,这样您就不必
或通过
.ingest命令:https://learn.microsoft.com/en-us/azure/kusto/management/data-ingestion/ingest-from-storage。虽然使用“定向摄入”的方法在产量方面不太推荐。另一种选择(不推荐生产量)是使用.ingest inline (AKA“摄入推送”)选项:https://learn.microsoft.com/en-us/azure/kusto/management/data-ingestion/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它将将上述记录附加到表中:
| a | b | c |
|-------------------|------|-----------------------------|
| hello | 17 | 2019-08-16 00:52:07.0000000 |
| world | 71 | 2019-08-16 00:52:08.0000000 |
| isn't, this neat? | -13 | 2019-08-16 00:52:09.0000000 |https://stackoverflow.com/questions/57517672
复制相似问题