Skip to content
Edit this page View source of this page

Context

Introduction

Context specifies how a query is calculated and cached in the TelemetryDeck Query Engine.

Specifics & Examples

Following you can find information regarding different Context elements available and an example of their application.

Name: Context Options

Explanation: There are four parameters usable via context.

If you specify a query context with your query, you can specify for how long it is cached, and how its calculation is prioritized for example. Example:

{
    "context": {
      "priority": -1,
      "grandTotal": true,
      "cacheValidityDuration": 1440
    }
}

Property Reference

Property: timezone
Description: What timezone should be used to bucket items with the given granularity? Usually we split days at midnight UTC, but with a timezone set, we can split days at midnight of the time zone. Requires a timezone format as supplied by web browsers, e.g. "Europe/Berlin" or "America/Los_Angeles".
Required: false

Property: priority
Description: the Query Priority. Queries with higher priority get precedence for in the query queue. Possible values are ‘-1’, ‘0’, ‘1’, '2'. Defaults to ‘0’.
Required: false

Property: grandTotal
Description: defines whether to include a grand total as the last row in query results. Defaults to ‘false’.
Required: false

Property: cacheValidityDuration
Description: defines how long the results of a query are cached. This is used to determine whether to use cached results or to re-run the query. Value is in minutes, default is 10.
Required: false