场景: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?