c# - "Control commands (starting with a dot ' 。 ') cannot be served from the query endpoint unless they are .show control commands.",

标签 c# azure-data-explorer kql

我试图通过 C# 程序执行 .csl 文件中的 Kusto 函数,但出现错误请求错误

"Control commands (starting with a dot '.') cannot be served from the query endpoint unless they are .show control commands."

我尝试使用 executecontrol 命令时出现解析错误。请帮忙

样本.csl -

.create-or-alter function Info_StampInfo(startTime:datetime, endTime:datetime) 
{
cluster(X).database('Y').['ClusterLog-ClusterBasicInfo']  | count
}

最佳答案

根据您提供的错误消息,我可以猜测您的 C# 程序正在尝试调用 ICslQueryProvider.ExecuteQuery(".create or alter function ...", 。 ..) 而不是 ICslAdminProvider.ExecuteControlcommand(".create or alter function ...", ...)

如果这不是一个很好的猜测,您可能想要分享:(1) 显示您的 C# 程序正在运行的代码片段; (2) 当您尝试使用 ExecuteControlCommand(...)

时的完整错误消息/堆栈跟踪

关于c# - "Control commands (starting with a dot ' 。 ') cannot be served from the query endpoint unless they are .show control commands.",,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59382441/

相关文章:

azure - 在 Kusto 中解析 `key1=value1 key2=value2`

azure-application-insights - 如果<某事>,则在 Kusto 中不执行任何操作

Azure KQL : convert date in string format "20210820122039" to datetime in azure KQL

Azure 仪表板 - 时间线图表停止在最后一个日志记录而不是当前时间

azure - 每天的累计独立用户数

c# - 如何限制谁可以使用界面进行更改?

c# - 通过将属性传递给方法来获取属性的名称

c# - 如何从c#发送邮件

c# - 以编程方式设置折线点(C#、vvvv/SVG-Library)

azure - KQL 更改评估数据透视表中的列顺序