ApiContractViolationError: management command .set-or-replace not supported

Copper Contributor


I've just created a new cluster using Azure Data Explorer query tools to query my Log Analytics and Application Insights workspace.

To do so I followed this article: https://learn.microsoft.com/en-us/azure/data-explorer/query-monitor-data.

I managed to succesfully create the cluster and now I can correctly get the data from AppTracess in my Azure Log Analytics workspace.

My need now is to paginate data creating a stored query througt the following command:


.set-or-replace stored_query_result DefaultXpkLogs with(previewCount = 10)
union isfuzzy = true AppTraces, AppExceptions
| project TimeGenerated, Properties
| extend Num = row_number()
| extend ExecutionTime = todouble(Properties["ExecTime"])
| where ExecutionTime > 110
| where TimeGenerated > datetime("2022-11-23T00:00:00.483Z") and
  TimeGenerated < datetime("2022-11-23T18:55:47.483Z")
| order by TimeGenerated desc


Unfortunately I keep getting the following Error:


ApiContractViolationError: management command .set-or-replace not supported

clientRequestId: KustoWebV2; c05bef06-638a-4ae6-bcb4-f167a2ff0446


Does anybody has an idea on how to fix the error?




1 Reply

@EFacchinetti not sure what your are trying to do. I suppose you want to simply save your query ? For this, you would do not need the set-or-replace statement. simply start with your table 
|  project TimeGenerated,...
Then you can use the "save" button on the top.