PorgtheEaten
PorgtheEaten

Reputation: 194

How to Store common query statements (Kusto.Explorer, KQL, Kusto, Azure Data Explorer, ADX)

Is there a way to store common query statements in Kusto.Explorer for future use. For example:

Most of my queries start with:

set notruncation;
set maxmemoryconsumptionperiterator=68719476736;
set servertimeout = timespan(15m);

I would like to use a 'variable name' to reference these instead of explicitly calling them out every time. Something like this:

Setlimitations
T
| summarize count() by Key

Upvotes: 1

Views: 706

Answers (1)

Yoni L.
Yoni L.

Reputation: 25895

set statements, when used, must be specified as part of each request.

However, you can define a request limits policy on the default / a custom workload group with the same settings, and those will apply to all requests classified to that workload group.

also see: https://y0nil.github.io/kusto.blog/blog-posts/workload-groups.html

do note that always running with notruncation, a very high maxmemoryconsumptionperiterator and an extended servertimeout probably indicates some inefficiency in your workload, and you may want to revisit the reason for these being used to begin with

  • e.g. if you're frequently exporting large volumes of data, you may prefer exporting them to cloud storage instead of via a query.

Upvotes: 2

Related Questions