小编jai*_*me_的帖子

Kusto 中的视图、物化与物化视图

场景:kusto 表中的数据在 5 小时后更新。任务:从 .net API 调用查询 在查询中,创建一个子查询并使用该子查询对更大的表执行联接

let table1=materialize(
Customer|where CustomerId=="cust-reg-aabb-cc232"|distinct CustomerId,City);
CustomerPurchase
|where CustomerId=="cust-reg-aabb-cc232"
//perform join with table1 and other things
Run Code Online (Sandbox Code Playgroud)

或者

let table1=view(){
Customer|where CustomerId=="cust-reg-aabb-cc232"|distinct CustomerId,City};
CustomerPurchase
|where CustomerId=="cust-reg-aabb-cc232"
//perform join with table1 and CustomerPurchase
Run Code Online (Sandbox Code Playgroud)

CustomerPurchase 和客户数据每 5 小时更新一次(添加新行)。更优化的是:创建视图或使用materialize方法。我浏览了文档,但无法理解两者之间的区别。

另外,由于我正在实现 API,是否可以使用物化视图而不是 table1?

.net kql azure-data-explorer kusto-explorer

5
推荐指数
1
解决办法
3693
查看次数

标签 统计

.net ×1

azure-data-explorer ×1

kql ×1

kusto-explorer ×1