Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v8.4/packages_api/data/dataquery.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v8.4/packages_api/data/dataquery/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
DataQuery interface
These are the common properties available to all queries in all datasources Specific implementations will *extend* this interface adding the required properties for the given context
Signature
export interface DataQuery Import
import { DataQuery } from '@grafana/data';Properties
| Property | Type | Description |
|---|---|---|
| datasource | DataSourceRef | null | For mixed data sources the selected datasource is on the query level. For non mixed scenarios this is undefined. |
| hide | boolean | true if query is disabled (ie should not be returned to the dashboard) |
| key | string | Unique, guid like, string used in explore mode |
| queryType | string | Specify the query flavor |
| refId | string | A - Z |
datasource property
For mixed data sources the selected datasource is on the query level. For non mixed scenarios this is undefined.
Signature
datasource?: DataSourceRef | null;hide property
true if query is disabled (ie should not be returned to the dashboard)
Signature
hide?: boolean;key property
Unique, guid like, string used in explore mode
Signature
key?: string;queryType property
Specify the query flavor
Signature
queryType?: string;refId property
A - Z
Signature
refId: string;