How to extend “.show queries” history?

This post has been republished via RSS; it originally appeared at: Azure Data Explorer articles.

The data is kept by for the last 30 days.


  • you require accessing earlier information about queries


  • that does not conflict with any security/compliance considerations users of your cluster may have


  • you can periodically export the data (using “.show queries”) and store it elsewhere (e.g. in a Kusto table in your database, using “.set-or-append” commands)
set-or-append async history with(tags='["ingest-by:myTag"]', ingestIfNotExists='["myTag"]') <| 
   .show queries

async command will return immediately with an operation ID - a guid - which you can use for periodically polling for the operation's status (using ".show operations <guid>").


.show operations 71af658a-c2e7-4e0a-97bc-79643b12478a


REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.