Skip to main content
Data warehouse integrations are available as a premium add-on for Kameleoon’s Web Experimentation and Feature Experimentation module. For more information, contact your Customer Success Manager.
The BigQuery integration lets Kameleoon read data from your BigQuery project for audience targeting and reporting, and send experiment exposure events back to it. Kameleoon supports data warehouse integration from the following providers:
  • BigQuery
  • Snowflake
  • Redshift
  • Databricks

Connect a BigQuery project to Kameleoon

Prerequisites

To configure this integration, you need the following:
  • Google Cloud account: You need a valid Google Cloud account to access Google BigQuery and generate the necessary credentials.
  • Google service account: You need a Google service account with the appropriate permissions to access BigQuery and create credentials.
  • BigQuery project: You need a Google BigQuery project set up to store and query data.
  • Credential file: You generate a credential file from your Google service account, which Kameleoon uses to securely access BigQuery.

Create a service account

Create a service account for Kameleoon in your project and give it the BigQuery Data Viewer role.
  1. Type service accounts in the global search bar, and click the suggested result.
The Google Cloud console search bar with service accounts typed in, and the Service Accounts result listed under Products and pages
  1. Click Create service account.
  2. Fill in the mandatory fields and click Create and continue.
  3. Type “BigQuery data viewer” in the Select a role field, and click BigQuery Data Viewer when it appears in the dropdown search.
The Grant this service account access to the project step, with BigQuery Data Viewer listed as a role option
  1. Click Continue, and then click Done.

Create a new dataset

Create a new dataset called “kameleoon” in your project.
The BigQuery workspace with the Explorer menu open, showing the Create dataset option
Select the region or multi-region that suits you.
The Create dataset panel, with the Dataset ID set to kameleoon and the multi-region location set to EU

Grant permissions to the service account

Grant the service account BigQuery Data Owner status on this “kameleoon” dataset

Grant the Kameleoon service account the BigQuery Data Owner role on the kameleoon dataset.
  1. In the BigQuery dashboard, click the kameleoon dataset in the Explorer bar on the left.
  2. Click Sharing > Permissions.
The kameleoon dataset page with the Sharing menu open and Permissions selected
  1. Click Add principal.
  2. Type in the Kameleoon service account name in the New principals field.
The Grant access panel for the kameleoon dataset, with the Kameleoon service account entered in the New principals field
  1. In the Assign roles field, type “BigQuery Data Owner.”
  2. Finish by clicking Save.

Create a custom role

Create a custom role that has the bigquery.jobs.create permission

Create a custom role that grants the bigquery.jobs.create permission, which lets the service account create BigQuery jobs.
  1. Navigate to Roles.
    • You can find Roles by typing “Roles” in the console global search field.
The Google Cloud console search bar with Roles typed in, and the Roles result listed under IAM and admin
  1. Click Create role.
  2. Enter a title and an ID for the role, for example Job Creator Role and CustomRole.
The Create role form with the title Job Creator Role, the ID CustomRole, and the Add permissions button
  1. Click Add permissions, and add bigquery.jobs.create from the dropdown list that appears in the pop-in window.
  2. Click Add.
The Create role form with bigquery.jobs.create listed as the assigned permission
  1. Click Create to finalize the custom role.

Add this custom role to the service account you created

Assign the custom role to the Kameleoon service account.
  1. Navigate to IAM in the sidebar of the Google Cloud console.
  2. You should see a list of Principals. A service account is a Principal. Find the Kameleoon service account in the list, and click the pen icon to edit the principal.
The IAM page filtered to the Kameleoon service account, with the edit principal pencil icon at the end of its row
  1. A configuration sidebar appears on the right. Click Add another role, and find the custom role you created for the bigquery.jobs.create permission (Job Creator Role in this example) in the dropdown menu.
The Edit access panel for the service account, with BigQuery Data Viewer assigned and a second role being selected from a dropdown
  1. Click Save.

Create a JSON key for the service account

Create a JSON key for the Kameleoon service account. Kameleoon uses this key file to connect to BigQuery.
  1. Open the Service accounts page in the Google Cloud console.
  2. Select your project.
  3. Click the email address of the Kameleoon service account.
  4. Open the Keys tab.
  5. Open the Add key drop-down menu, and choose Create new key.
  6. Set Key type to JSON, and click Create.
Google Cloud saves the key file to your computer when you click Create. You can’t download the key again, so store the file in a secure location.

Enable the integration for your project

Enable the BigQuery integration in Kameleoon with the service account credential file.
  1. Log in to your Kameleoon account, and click Admin > Integrations.
The BigQuery card in the Integrations dashboard, with an Add-on badge and the Data Warehouse label
  1. Select BigQuery.
  2. Choose the project on which you want to enable BigQuery.
  3. Click Upload file, and select your JSON file.
  4. Click Validate to save your changes.
The BigQuery settings for a project, with credential.json uploaded, the destination and source options turned on, and the Data Ingestion Task section below them

Manage multiple projects

If you have multiple projects, and you want to configure the BigQuery integration for each of them, you can do so from the same Kameleoon account. To switch between project configurations, use the project dropdown menu provided within the integration settings. This dropdown lets you select and manage the integration settings for each project. Keep in mind that each project has different configuration settings. You need to upload a unique JSON credential file for each project. However, if the permissions granted by a single credential file are applicable to several projects, you can reuse the same credential file for those projects.
The project dropdown in the BigQuery settings, open to show two project URLs
Use the enabled integration in one of these ways:

Data region

Kameleoon stores the data from this integration in the Kameleoon data region of your account, which is the US or the EU.