有时在 Kusto 中获取摄取失败,并出现错误 -“Stream_WrongNumberOfFields”

Sometimes Getting ingestion failures in Kusto, with error -" Stream_WrongNumberOfFields"

我正在将流数据引入 Kusto。因此,首先记录在源 table 中作为单个字符串摄取,然后解析并插入到另一个目标 table.

我的每个文件都有大约 10000 条记录。一些记录被摄入源 table 很好,但有时我会收到此错误:

"Stream_WrongNumberOfFields: HResult: 0x80DA0008, source: (CSV error: record 7 (line: 8, byte: 2767): found record with 1 fields, but the previous record has 2 fields)".

我在使用 .show ingestion failures 进行监控时遇到此错误。

所以每次摄取都会丢失一些数据。该文件格式完美。知道发生了什么事吗?

摄取映射是

.create table tempTable ingestion csv mapping 'MappingCSV' '[{"column":"Record","Ordinal":"0"}]'

看起来有些行在某些行中有一个额外的逗号(或缺少一个逗号),在上面的错误消息中,第 7 行似乎就是这种情况。

如果您尝试将每一行提取到同一列中,请将 ingestion data format 设置为“TXT”而不是 CSV,这会将源文件中的每一行提取到您的 table.