In this article we will show you how to store your Segment data in BiqQuery. To do this, you need to follow a few steps:
Make sure billing is enabled on your project, or Segment will not be able to write into the cluster.
Refer to Google Cloud’s documentation about service accounts for more information.
From the Navigation panel on the left, go to IAM & admin > Service accounts
Click Create Service Account along the top
Enter a name for the service account (for example: “segment-warehouses”) and click Create
When assigning permissions, make sure to grant the following roles:
In Segment, go to Workspace > Add destination > Search for “BigQuery” - it can be found in Storage Destinations
Select BigQuery
Add a name for the destination
Enter your project ID in the Project field
Copy the contents of the credentials (the JSON key) into the Credentials field
Optional: Enter a region code in the Location field (the default will be “US”)
Click Connect
If Segment can connect with the provided Project ID and Credentials, a warehouse will be created and your first sync should begin shortly
Once the data will reach BigQuery, under your project, you will be able to see a new dataset with multiple tables and partitioned tables (special tables that are divided into segments that make it easier to manage and query your data).