Adx Azure DevOps 任务中带回填 属性 的 ADX 实体化视图与 IaC 的幂等性对比

ADX Materialized Views with backfill property vs idempotency with IaC in Adx Azure DevOps Tasks

我们正在研究使用 ADX 的解决方案。我们已经创建了一些负责创建 ADX 集群的 arm 模板,然后我们有 Adx Azure DevOps Tasks 使用的 *.csl 脚本来使用提示创建表、函数、策略等:

现在我们的 adx 中有很多数据,我们想添加使用 backfill=true 属性 的物化视图,以确保现有数据将包含在这个观点。

假设这是我们要使用的示例查询:

.create-or-alter materialized-view with (backfill=true) ArgMax on table T
{
    T | summarize arg_max(Timestamp, *) by User
}

当我们第一次运行这个命令时,它会创建物化视图,一切正常,但如果我们再次运行它(IaC的持续部署)它会return 一个错误:

Unsupported propery in materialized view alter command. Supported properties: DimensionTables,Lookback,Folder,DocString,AutoUpdateSchema.

所以看起来幂等性在IaC中不能用物化视图来维护。

.create-or-alter materialized-view documentation 说有一些限制:

The backfill property isn't supported if the materialized view already exists. If the materialized view already exists, it cannot be backfilled.

我们的情况是,我们有backfilled物化视图,我们不能运行最终没有改变任何东西的命令。

我们想知道这是否是正确的行为,如果有任何关于如何使用 ADX 物化视图和 IaC 实现幂等性的想法或想法,我们将不胜感激

使用 create ifnotexists 对你有用吗?

.create ifnotexists materialized-view with (backfill=true) ArgMax on table T
{
    T | summarize arg_max(Timestamp, *) by User
}