0

我正在尝试使用参数构建 Log Analytics 工作簿。工作簿无法识别其中一个参数。

这里发生了什么?

例子:

  • 使用{STORAGE_ACCOUNT:label}作为参数会导致:

  • 错误:" operator:Failed to resolve table or column or scalar expression named '<storageaccountname>'...

  • 在此处输入图像描述

  • 查询<storageaccountname>中的硬编码不会导致错误

  • 在此处输入图像描述

4

1 回答 1

1

when using single value parameters like {STORAGE_ACCOUNT:label}, you still need to enclose them in quotes (either single or double) to make them valid strings:

let varStorageAccount = '{STORAGE_ACCOUNT:label}';

you're doing that in the example when you hardcode the string.

when using multi-value parameters (like multiselect dropdowns), then the quote and delimiter settings are part of that parameter itself. but for single value parameters like text or single select dropdown, there's no quotes by default, so that the parameters can represent things that wouldn't normally be quoted.

于 2021-08-03T00:31:24.020 回答