BigQuery Reverse ETL Setup

Set up BigQuery as your Reverse ETL source.

You need to be an account admin to set up the Segment BigQuery connector as well as write permissions for the __segment_reverse_etl dataset.

To set up the Segment BigQuery connector:

  1. Navigate to IAM & Admin > Service Accounts in BigQuery.
  2. Click + Create Service Account to create a new service account
  3. Enter your Service account name and a description of what the account will do
  4. Click Create and Continue.
  5. In the Grant this service account access to project section, select the BigQuery User role to add.
  6. Click + Add another role and add the BigQuery Job User role.
  7. Click Continue.
  8. Click Done.
  9. Search for the service account you just created.
  10. When your service account pulls up, click the 3 dots under Actions and select Manage keys.
  11. Click Add Key > Create new key.
  12. In the pop-up window, select JSON for the key type and click Create. The file will download.
  13. Copy all the content within the file you just created and downloaded.
  14. Navigate to the Segment UI and paste all the credentials you copied from step 13 into the Enter your credentials section.
  15. Enter your Data Location.
  16. Click Test Connection to test to see if the connection works. If the connection fails, make sure you have the right permissions and credentials and try again.
  17. Click Create Source if the test connection is successful.

Once you’ve added BigQuery as a source, you can add a model.

Constructing your own role or policy

When you construct your own role or policy, Segment needs the following permissions:

Permission Details
bigquery.datasets.create This allows Segment to create/manage a __segment_reverse_etl dataset for tracking state between syncs.
bigquery.datasets.get This allows Segment to determine if the aforementioned dataset exists This allows Segment to execute queries on any datasets/tables your model query references and manage tables that Segment uses for tracking

The bigquery.datasets.* permissions can be scoped only to the __segment_reverse_etl dataset. If you don’t wish to grant bigquery.datasets.create access, you may create this dataset yourself, but Segment still needs bigquery.datasets.get access.

This page was last modified: 28 Mar 2023

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
Create free account