Connect BigQuery for Warehouse-Native Experiment Analysis
Este producto no es compatible con el
sitio Datadog seleccionado. (
).
Overview
Warehouse-native experiment analysis lets you run statistical computations directly in your data warehouse.
To set this up for BigQuery, connect a BigQuery service account to Datadog and configure your experiment settings. This guide covers:
Prerequisites
Datadog connects to BigQuery through a Google Cloud service account. If you already have a service account connected to Datadog, skip to Step 1. Otherwise, expand the section below to create one.
- Open your Google Cloud console.
- Navigate to IAM & Admin > Service Accounts.
- Click Create service account.
- Enter the following:
- Service account name.
- Service account ID.
- Service account description.
- Click Create and continue.
- Note: The Permissions and Principals with access settings are optional here. These are configured in Step 2.
- Click Done.
After you create the service account, continue to Step 1 to set up the Google Cloud resources.
Step 1: Prepare the Google Cloud resources
Datadog Experiments uses a BigQuery dataset for caching experiment results and a Cloud Storage bucket for staging experiment records.
Create a BigQuery dataset
- Open your Google Cloud console.
- In the Search bar, search for BigQuery.
- In the Explorer panel, expand your project (for example,
datadog-sandbox). - Select Datasets, then click Create dataset.
- Enter a Dataset ID (for example,
datadog_experiments_output). - (Optional) Select a Data location from the dropdown, add Tags, and set Advanced options.
- Click Create dataset.
Create a Cloud Storage bucket
Create a Cloud Storage bucket that Datadog Experiments can use to stage experiment exposure records. See Google’s Create a bucket documentation.
Step 2: Grant permissions to the Datadog service account
The Datadog Experiments service account requires specific permissions to run warehouse-native experiment analysis.
Assign IAM roles at the project level
To assign IAM roles so Datadog Experiments can read and write data, and run jobs in your data warehouse:
- Open your Google Cloud console and navigate to IAM & Admin > IAM.
- Select the Allow tab and click Grant access.
- In the New principals field, enter the service account email.
- Using the Select a role dropdown, add the following roles:
- BigQuery Job User: Allows the service account to run BigQuery jobs.
- BigQuery Data Owner: Grants the service account full access to the Datadog Experiments output dataset.
- Storage Object User: Allows the service account to read and write objects in the storage bucket that Datadog Experiments uses.
- BigQuery Data Viewer: Allows the service account to read tables used in warehouse-native metrics.
- Click Save.
Grant read access to specific source tables
Repeat the following steps for each dataset you plan to use for experiment metrics:
- In the Google Cloud console Search bar, search for BigQuery.
- In the Explorer panel, expand your project (for example,
datadog-sandbox). - Click Datasets, then select the dataset containing your source tables.
- Click the Share dropdown and select Manage permissions.
- Click Add principal.
- In the New principals field, enter the service account email.
- Using the Select a role dropdown, select the BigQuery Data Viewer role.
- Click Save.
Datadog supports one warehouse connection per organization. Connecting BigQuery replaces any existing warehouse connection (for example, Snowflake).
After you set up your Google Cloud resources and IAM roles, configure the experiment settings in Datadog:
- Open Datadog Product Analytics.
- In the left navigation, hover over Settings and click Experiments.
- Select the Warehouse Connections tab.
- Click Connect a data warehouse. If you already have a warehouse connected, click Edit instead.
- Select the BigQuery tile.
- Under Select BigQuery Account, enter:
- GCP service account: The service account you are using for Datadog Experiments.
- Project: Your Google Cloud project.
- Under Dataset and GCS Bucket, enter:
- Dataset: The dataset you created in Step 1 (for example,
datadog_experiments_output). - GCS Bucket: The Cloud Storage bucket you created in Step 1.
- Click Save.
After you save your warehouse connection, create experiment metrics using your BigQuery data.
Further reading
Más enlaces, artículos y documentación útiles: