You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

更新跟随者集群配置:指定包含表数组的正确语法咨询

正确的Azure CLI参数语法(PowerShell环境)

你需要调整两个关键点来解决问题:

  1. 合并--table-level参数
    不要拆分使用两个--table-level,应将tables-to-include和materialized-views-to-include放在同一个--table-level参数中,用空格分隔两组键值对。拆分使用会导致后一个参数覆盖前一个的配置,这也是你的表列表未生效的核心原因。

  2. 正确指定多表列表
    在PowerShell环境中,需要将包含多表的键值对用双引号括起来,避免PowerShell将逗号解析为参数分隔符。

修正后的完整命令

az kusto attached-database-configuration update `
--attached-database-configuration-name azconfig `
--cluster-name "myfollower" `
--resource-group "MY_RESOURCE_GROUP" `
--table-level "tables-to-include=table1,table2,table3,table4,table5 materialized-views-to-include=*_view"

替代方案(使用PowerShell变量)

如果表列表较长,也可以先定义变量拼接成字符串,再传入命令:

$targetTables = @("table1", "table2", "table3", "table4", "table5")
$tablesList = $targetTables -join ","

az kusto attached-database-configuration update `
--attached-database-configuration-name azconfig `
--cluster-name "myfollower" `
--resource-group "MY_RESOURCE_GROUP" `
--table-level "tables-to-include=$tablesList materialized-views-to-include=*_view"

注:Azure CLI的参数解析逻辑和PowerShell Cmdlet(如New-AzKustoAttachedDatabaseConfiguration)不同,后者支持直接传入PowerShell数组,而Azure CLI需要遵循基于字符串的参数格式。

内容的提问来源于stack exchange,提问作者Werner

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 01:25:25