Google BigQuery data source
The Google BigQuery data source allows you to query and visualize data from Google BigQuery, Google’s fully managed, serverless data warehouse.
Supported features
Requirements
The following Google APIs must be enabled in your GCP project:
Get started
Install the plugin from Administration > Plugins and data > Plugins, or from the Grafana plugin catalog. After the plugin is installed, the following documents help you get started:
- Configure the BigQuery data source - Set up authentication and connect to BigQuery.
- BigQuery query editor - Create and edit SQL and visual queries.
- Template variables - Create dynamic dashboards with BigQuery variables.
- Alerting - Create alert rules using BigQuery data.
- Troubleshooting - Solve common configuration and query errors.
Additional features
After you configure the BigQuery data source, you can:
- Add Annotations to overlay BigQuery events on your graphs.
- Configure and use Template variables for dynamic dashboards.
- Add Transformations to manipulate query results.
- Set up Alerting rules based on your BigQuery data.
- Use Explore to investigate your BigQuery data without building a dashboard.
- Build queries with Grafana Assistant when it’s available in your Grafana instance.
Pre-built dashboards
The BigQuery data source plugin includes the following pre-built dashboards:
- Array queries examples - Demonstrates how to work with BigQuery arrays and nested data structures.
To import a pre-built dashboard:
- Go to Connections > Data sources.
- Select your BigQuery data source.
- Click the Dashboards tab.
- Click Import next to the dashboard you want to use.
Plugin updates
Always ensure that your plugin version is up-to-date so you have access to all current features and improvements. Navigate to Administration > Plugins and data > Plugins to check for updates.
Note
On Grafana Cloud, the Google BigQuery plugin is managed by Grafana and updates automatically. On self-managed Grafana, you must update the plugin manually. Refer to Version and upgrade guidance.
Query with the Grafana CLI
You can query this data source from the command line and from AI coding agents using the Grafana CLI, gcx. gcx gives you and your agent structured, terminal-based access to your Grafana data sources, which is useful for automation and agent-driven investigations.
gcx supports Grafana Cloud and Grafana OSS or Enterprise v12 and later. Before you query, install and authenticate gcx. Refer to the
gcx CLI documentation for installation, configuration, and the full command reference.
For example, to query your BigQuery data source, use gcx datasources bigquery:
# Run a SQL query
gcx datasources bigquery query -d <DATASOURCE_UID> 'SELECT count(*) FROM `my_dataset.events`'
# List datasets in the default project
gcx datasources bigquery list-datasets -d <DATASOURCE_UID>
# List tables in a dataset
gcx datasources bigquery list-tables -d <DATASOURCE_UID> --dataset my_dataset
# Show a table's column schema
gcx datasources bigquery describe-table my_dataset.events -d <DATASOURCE_UID>Replace <DATASOURCE_UID> with the UID of your BigQuery data source. The query command accepts GoogleSQL with server-side macros such as $__timeFilter; list-datasets, list-tables, and describe-table let you explore schema, and --dataset targets a specific dataset.


