如何在 Kusto 中使用动态关键字

How do I use dynamic keyword in Kusto

我正在使用 Azure Resource Graph,它使用 Kusto 语言来查询 Azure 资源,我对如何通过现有对象的 dynamic 关键字创建自己的对象感到困惑。下面的示例显示我正在尝试将相同的值分配给 disk 给动态对象 osDisk 但它失败了 InvalidQuery。我做错了什么?

where type =~ 'Microsoft.Compute/virtualmachines' 
| extend disk = properties.storageProfile.osDisk 
| extend osDisk = dynamic({"osdisk" : properties.storageProfile.osDisk})
|project disk, osDisk

错误

Please provide below info when asking for support: timestamp = 2019-07-20T01:55:46.6283092Z, correlationId = 297ad2ed-81f2-49b3-86b2-5f38e2394923. (Code: BadRequest) Query is invalid. Please refer to the documentation for the Azure Resource Graph service and fix the error before retrying. (Code: InvalidQuery)

删除 dynamic 行选项 returns 结果正确

尝试使用 pack()https://docs.microsoft.com/en-us/azure/kusto/query/packfunction

print disk = "disk_value", properties = dynamic({"storageProfile":{"osDisk":"osDisk_value"}})
| project disk,  osDisk = pack("osDisk", properties.storageProfile.osDisk)