Overview
The BigQuery integration connects Datadog to your Google Cloud project to sync metadata, query history, and table-level metrics. Use it to monitor data freshness, detect anomalies, and trace lineage across your data stack.
To configure the BigQuery integration in Datadog:
- Navigate to Datadog Data Observability > Settings.
- Click the Configure button for the BigQuery option.
You can now choose to use a service account that you’ve already connected to Datadog or set up a new one specifically for Data Observability.
Using an existing service account
Choose this option if you’ve previously connected a service account to Datadog.
- Select the Use connected Service Account option.
- Select the service account from the dropdown list.
- Click Next.
- Turn on the Enable Data Observability toggle and click Add Account.
Data Observability functionality requires additional roles and API access beyond the basic BigQuery integration.
Additional roles
Apply the following roles to the service account in your GCP IAM console.
Additional APIs
Make sure the following APIs have been enabled in the project associated with the service account.
| API | API ID | Description |
|---|
| BigQuery API | bigquery.googleapis.com | Required to access BigQuery |
Using a new service account
- Select the Add new Service Account option.
- Choose one of the setup methods. Quick Start is recommended for most users since it requires no manual permissions setup.
After you’ve completed the Quick Start flow, click Next to proceed to the next page and enable the Enable Data Observability toggle before clicking Add Account.
Manual setup
In your Google Cloud console’s IAM page, create a service account with the following roles:
| Role | Role ID | Description |
|---|
| Monitoring Viewer | roles/monitoring.viewer | Provides read-only access to the monitoring data available in your Google Cloud environment |
| Cloud Asset Viewer | roles/cloudasset.viewer | Provides read-only access to cloud assets metadata |
| Browser | roles/browser | Provides read-only access to browse the hierarchy of a project |
| BigQuery Data Viewer | roles/bigquery.dataViewer | Provides visibility into datasets |
| BigQuery Resource Viewer | roles/bigquery.resourceViewer | Provides visibility into jobs |
| Job User | roles/bigquery.jobUser | Required to run data quality queries |
| Compute Viewer | roles/compute.viewer | Provides read-only access to get and list Compute Engine resources |
In Datadog, after you’ve selected the Manual setup method:
- Copy the generated Datadog Principal to your clipboard. If this is your first time configuration GCP you’ll need to first click the Generate Principal button.
- In the Google Cloud console, under Service Accounts, find the service account you recently created and click on it.
- Navigate to the Principals with access tab and click the Grant access button.
- Paste the Datadog Principal into the New principals text box.
- Under the Assign roles section, select the Service Account Token Creator role. This will allow the Datadog Principal to impersonate the service account you just created.
- Click the Save button.
Finally, you need to enable the following APIs for every project you want to monitor, including the project where the service account has been created.
| API | API ID | Description |
|---|
| Cloud Monitoring API | monitoring.googleapis.com | Allows Datadog to query your Google Cloud metric data |
| Cloud Asset API | cloudasset.googleapis.com | Allows Datadog to request Google Cloud resources and link relevant labels to metrics as tags |
| Compute Engine API | compute.googleapis.com | Allows Datadog to discover compute instance data |
| Cloud Resource Manager API | cloudresourcemanager.googleapis.com | Allows Datadog to append metrics with the correct resources and tags |
| BigQuery API | bigquery.googleapis.com | Required to access BigQuery |
Once the service account has been created and the necessary roles and APIs have been applied, you can return to Datadog.
- Click Verify and save account.
- Click Next.
- Turn on the Enable Data Observability toggle and click Add Account.
Next steps
After you configure the integration, Datadog begins syncing your information schema and query history in the background. Initial syncs can take several hours depending on the size of your BigQuery deployment.
Further reading
Additional helpful documentation, links, and articles: