Cancel Query by Tag


Cancel Query by Tag is currently in Private Preview. Contact Rockset Support to enable this feature.

Query Tagging enables the cancellation of one or more in-flight queries, even if they are running synchronously or you do not know their query IDs.

When executing a query or query lambda, you may now specify an optional cancellation_tag as a string in the request body. For instance:

  "cancellation_tag": "my-tag",
  "sql": {
    "query": "SELECT * from commons.collection"

The cancellation tag may be any arbitrary string up to 64 characters long.

Later, you may cancel all running queries with the given cancellation tag within the current region by executing a DELETE request to /orgs/self/queries/tag/:cancellationTag. For example, the following request:

curl -X DELETE -H "Authorization: ApiKey ..."

would cancel all currently running queries tagged with my-tag within us-west-2.

If your cancellation tag has URL-unsafe characters (for instance, slashes), you must URL-encode your cancellation tag when making the above request.

Cancellation will only be allowed if the user has a role with the QUERY_VI privilege on every VI where a query with that tag is running.