microsoft / Kusto-Query-Language

Kusto Query Language is a simple and productive language for querying Big Data.
Apache License 2.0
510 stars 97 forks source link

Error with table function in workspace expression #97

Closed puijjar closed 1 year ago

puijjar commented 1 year ago

This works:

workspace("<workspace name>").table("CommonSecurityLog")
| limit 1

This doesn't:

let table_name = "CommonSecurityLog";
workspace("<workspace name>").table(table_name)
| limit 1

And produces error:

One or more pattern references were not declared. Detected pattern references: ["workspace('<workspace name>')"]

sloutsky commented 1 year ago

This is not directly related to KQL repo. I believe you're referring to Azure Monitor 'workspace' function and implementation limitations related to construct of 'pattern' statement that do not allow parametrization.