azure - 从 Azure 数据资源管理器 (Kusto) 中的查询创建物化 View

标签 azure azure-data-explorer kql kusto-explorer

需要有关 Kusto(Azure 数据资源管理器)的一些帮助。

是否可以将此查询转换为物化 View ?

customobject
| join kind=inner (
    customobject
    | summarize max_dp_adf_copy_start_time = max(dp_adf_copy_start_time) by accountId, id
    )
    on
         $left.accountId == $right.accountId
         and $left.id == $right.id
         and $left.dp_adf_copy_start_time == $right.max_dp_adf_copy_start_time

我已经尝试过这个,但它返回预期语法错误:):

.create materialized-view mvw_customobject on table customobject
{
customobject 
| join kind=inner (
    customobject
    | summarize max_dp_adf_copy_start_time = max(dp_adf_copy_start_time) by accountId, id
    )
    on
         $left.accountId == $right.accountId
         and $left.id == $right.id
         and $left.dp_adf_copy_start_time == $right.max_dp_adf_copy_start_time
}

非常感谢您的帮助!

最诚挚的问候:)

最佳答案

我在我的环境中进行了复制,以下是我的观察结果并遵循Microsoft-Document :

我和你一开始有类似的情况:

enter image description here

在这里,在您和我的查询中,问题在于汇总语句,因为在创建 View 时汇总语句应作为最后一条语句,并且只应使用一个汇总语句。当我进行类似的更改时,它的执行如下:

示例1:

.create materialized-view mvw_customobject5 on table chotu
{
    chotu
    | join kind = inner (chotu) on $left.EventId==$right.EventId
    |summarize take_any(*) by EventId
}

enter image description here

示例2:

.create materialized-view mvw_customobject00 on table chotu
{
    chotu
    | join kind = inner (chotu
    |project EventId) on $left.EventId==$right.EventId
    |summarize take_any(*) by EventId
}

enter image description here

你可以清楚地检查我提供的文档,尝试按照示例进行操作,你将获得像我一样创建的 View 。

关于azure - 从 Azure 数据资源管理器 (Kusto) 中的查询创建物化 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76708270/

相关文章:

azure - 在 azure 中创建 WAFV2 应用程序网关时添加子网时出错

Azure ADD 隐藏默认 URL 并使用 C# 显示所需 URL

azure - 外部应用于 kusto/Azure AppInsights

azure - KQL 获取存储帐户的已用容量

azure - Azure AD B2C 上的单点注销

c# - 升级到版本 2.8 后,Azure 计算模拟器停止工作,先决条件错误

azure - 使用 kusto 查询语言查找某列等于字符串 A 或字符串 B 的所有记录

regex - Azure Kusto - 解析正则表达式的使用位置 - 不区分大小写

parameters - 如何在 KQL 查询中指定参数?

Azure 数据资源管理器多数据库限制