【问题标题】:"Control commands (starting with a dot '.') cannot be served from the query endpoint unless they are .show control commands.",“控制命令(以点 '.' 开头)不能从查询端点提供,除非它们是 .show 控制命令。”,
【发布时间】:2019-12-17 21:34:23
【问题描述】:

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

“除非是 .show 控制命令,否则无法从查询端点提供控制命令(以点 '.' 开头)。”

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

sample.csl -

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

【问题讨论】:

    标签: c# azure-data-explorer kql


    【解决方案1】:

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

    如果这不是一个很好的猜测,您可能想分享:(1) 一个代码 sn-p,显示您的 C# 程序正在运行什么; (2) 尝试使用ExecuteControlCommand(...)时的完整错误消息/堆栈跟踪

    【讨论】:

      猜你喜欢
      • 2014-04-10
      • 2017-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-01
      • 1970-01-01
      相关资源
      最近更新 更多