我们有一个场景,其中一些参考数据被提取到 Kusto 表(约 1000 行)中。
为了处理由于日常数据加载导致的数据重复(正如 Kusto 总是追加的那样),我们在表的顶部创建了一个物化视图 (MV) 来汇总数据并根据 ingestion_time() 获取最新数据,以便查询MV 将始终导致最新更新的参考数据。
我们的下一个问题是使用 Kusto 连续数据导出将这些格式化数据导出到存储容器中(请参阅 MS 文档),但是,我们似乎无法使用物化视图来设置连续导出。
所以看选项,有没有什么办法可以在kusto中创建一个truncate load table而不是Materialized View,这样我们就不会在表中有重复的记录,可以用来做连续导出。
.create async materialized-view with (backfill=true) products_vw on table products
{
products
| extend d=parse_json(record)
| extend
createdBy=tostring(d.createdBy),
createdDate = tostring(d.createdDate),
product_id=tostring(d.id),
product_name=tostring(d.name),
ingest_time=ingestion_time()
| project
ingest_time,
createdBy,
createdDate,
product_id,
product_name
| summarize arg_max(ingest_time, *) by product_id
}