You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/storage/catalog/bigquery/index.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,7 @@ loaded into one of the most powerful and cost-effective data warehouses today.
18
18
19
19
## Getting Started
20
20
21
-
First, you'll want to enable BigQuery for your Google Cloud project. Then, you
22
-
will create a Service Account for Segment to use. Last, you will create the
23
-
warehouse in Segment.
21
+
In order store your Segment data in BigQuery, you must [enable BigQuery for your Google Cloud project](#create-a-project-and-enable-bigquery), [create a GCP service account for Segment to assume](#create-a-service-account-for-segment), and [create a warehouse in the Segment app](#create-the-warehouse-in-segment).
24
22
25
23
### Create a Project and Enable BigQuery
26
24
@@ -30,8 +28,8 @@ warehouse in Segment.
30
28
- If you have an existing project, you will need to [enable the BigQuery API](https://cloud.google.com/bigquery/quickstart-web-ui).
31
29
Once you've done so, you should see BigQuery in the "Resources" section of Cloud Platform.
32
30
-**Note:** make sure [billing is enabled](https://support.google.com/cloud/answer/6293499#enable-billing) on your project,
33
-
otherwise Segment will not be able to write into the cluster.
34
-
3. Copy your project ID, as you will need it later.
31
+
or Segment will not be able to write into the cluster.
32
+
3. Copy your project ID, as you will need it when creating your warehouse source in the Segment app.
35
33
36
34
### Create a Service Account for Segment
37
35
@@ -40,7 +38,7 @@ for more information.
40
38
41
39
1. From the Navigation panel on the left, go to **IAM & admin** > **Service accounts**
42
40
2. Click **Create Service Account** along the top
43
-
3. Enter a name (for example: "segment-warehouses") and click **Create**
41
+
3. Enter a name for the service account (for example: "segment-warehouses") and click **Create**
44
42
4. When assigning permissions, make sure to grant the following roles:
45
43
-`BigQuery Data Owner`
46
44
-`BigQuery Job User`
@@ -51,8 +49,9 @@ The downloaded file will be used to create your warehouse in the next section.
51
49
52
50
1. In Segment, go to **Workspace** > **Add destination** > Search for "BigQuery"
53
51
2. Select **BigQuery**
54
-
3. Enter your project ID in the **Project** field
55
-
4. Copy the contents of the credentials (the JSON key) into the **Credentials** field <br/>
52
+
3. Add a name for the destination to the **Name your destination** field
53
+
4. Enter your project ID in the **Project** field
54
+
5. Copy the contents of the credentials (the JSON key) into the **Credentials** field <br/>
56
55
**Optional:** Enter a [region code](https://cloud.google.com/compute/docs/regions-zones/) in the **Location** field (the default will be "US")
57
56
6. Click **Connect**
58
57
7. if Segment is able to successfully connect with the provided **Project ID** and **Credentials**,
@@ -105,7 +104,7 @@ from <project-id>.<source-name>.<collection-name>_view
105
104
For early customers using BigQuery with Segment, rather than providing Segment
106
105
with credentials, access was granted to a shared Service Account
107
106
(`connector@segment-1119.iam.gserviceaccount.com`). While convenient for early
108
-
adopters, this presents potential security risks that Segment would prefer to address
107
+
adopters, this presented potential security risks that Segment would prefer to address
109
108
proactively.
110
109
111
110
As of **March 2019**, Segment requires BigQuery customers to
@@ -117,18 +116,18 @@ Account.
117
116
In order to stay ahead of this change, make sure to migrate your warehouse by following
118
117
the instructions in the "Create a Service Account for Segment" section above.
119
118
Then, head to your warehouse's connection settings and update with the
120
-
**Credentials** you created along the way.
119
+
**Credentials** you created.
121
120
122
121
123
122
## Best Practices
124
123
125
124
### Use views
126
125
127
126
BigQuery charges based on the amount of data scanned by your queries. Views are
128
-
a derived view over your tables that we use for de-duplication of events.
127
+
a derived view over your tables that Segment uses for de-duplication of events.
129
128
Therefore, we recommend you query a specific view whenever possible to avoid
130
129
duplicate events and historical objects. It's important to note that BigQuery
131
-
views are not cached:
130
+
views are not cached.
132
131
133
132
> BigQuery's views are logical views, not materialized views, which means that
134
133
> the query that defines the view is re-executed every time the view is queried.
0 commit comments