Warehouse-native experiment analysis lets you run statistical computations directly in your data warehouse.
To set this up for Amazon Redshift, connect a Redshift cluster to Datadog using the AWS integration and configure your experiment settings. This guide covers:
Datadog Experiments connects to Redshift through Datadog’s Amazon Web Services (AWS) integration. If you already have the AWS integration configured for the account containing your Redshift cluster, skip to Step 1.
Set up the AWS integration
Adding an AWS account requires the AWS Configurations Manage permission. If your organization uses custom roles, verify that your role includes this permission.
Click the Amazon Web Services tile to open its modal.
Click Add AWS Account(s) under the Configuration tab.
If you do not yet have the AWS integration installed, Add AWS Account(s) appears on the AWS landing page after you open the integration tile.
Follow the CloudFormation setup flow to create an IAM role that allows Datadog to make API calls to your AWS account:
Select your AWS Region.
Choose your Datadog API Key.
Create a Datadog Application Key.
Toggle off Deploy log forwarder and Disable All Log Resources (these are not needed for experiment analysis).
Select No for Detect security issues.
Click Open in AWS Console to launch your CloudFormation template. See the Getting Started with AWS documentation for instructions on navigating the AWS console.
You can follow your configuration’s completion steps under Deployment Status on the integration setup page in Datadog.
Create a Datadog service user and a dedicated schema for Datadog to store experiment results and intermediate tables.
You must have superuser or admin privileges in the Redshift database to create the Datadog service user.
Create a Datadog service user in your Redshift database
Run the following command to create a service user with a strong password that Datadog can use to execute queries. Replace datadog_experiments_user with your user value and Your_Strong_Password with your password.
Run the following commands to create a schema where Datadog can store experiment results and intermediate tables. Replace datadog_experiments_output with your schema name and datadog_experiments_user with your service user value.
Grant the service user read access to your metric data
Grant the service user read access to the tables or schemas that contain your source data. These are the tables you plan to use for experiment metrics, and are typically in a different schema than the output schema created above. Run the GRANT USAGE command, then run the GRANT SELECT option that matches your access needs. Replace datadog_experiments_user, <schema>, and <table> with the appropriate values.
GRANTUSAGEONSCHEMA<schema>TOdatadog_experiments_user;-- Option 1: Give read access to a single table
GRANTSELECTONTABLE<schema>.<table>TOdatadog_experiments_user;-- Option 2: Give read access to all tables in the schema
GRANTSELECTONALLTABLESINSCHEMA<schema>TOdatadog_experiments_user;
Step 2: Create AWS resources and grant IAM permissions
Create an S3 bucket
Create an S3 bucket for importing exposure events into your warehouse. The bucket name must start with datadog-experimentation- (for example, datadog-experimentation-[aws_account_id]). You can use the bucket’s default settings.
Grant additional IAM permissions
In addition to the permissions listed in the AWS integration documentation, Datadog Experiments requires additional IAM permissions to run warehouse-native experiment analysis.
Use the following table to gather the values for your environment, then add the policy statement below to the IAM role that your Datadog AWS integration uses.
Datadog supports one warehouse connection per organization. Connecting Redshift replaces any existing warehouse connection (for example, Snowflake).
Configuring experiment settings requires the Product Analytics Settings Write permission. If your organization uses custom roles, verify that your role includes this permission.
After you set up your AWS integration and Redshift cluster, configure the experiment settings in Datadog: