Skip to content

Commit adb2ed4

Browse files
committed
change the order
1 parent e9ead23 commit adb2ed4

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

src/connections/reverse-etl/reverse-etl-source-setup-guides/bigquery-setup.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ title: BigQuery Reverse ETL Setup
33
redirect_from:
44
- '/reverse-etl/bigquery-setup/'
55
---
6+
## Constructing your own role or policy
7+
When you construct your own role or policy, Segment needs the following permissions:
8+
9+
Permission | Details
10+
---------- | --------
11+
`bigquery.datasets.create` | This allows Segment to create/manage a `__segment_reverse_etl` dataset for tracking state between syncs.
12+
`bigquery.datasets.get` | This allows Segment to determine if the aforementioned dataset exists.
13+
`bigquery.jobs.create` | This allows Segment to execute queries on any datasets or tables your model query references, and also allows Segment to manage tables used for tracking.
14+
15+
If you don't want to grant Segment `bigquery.datasets.create` access, you can create your own `__segment_reverse_etl` dataset and give Segment the following permissions:
16+
17+
Permission | Details
18+
---------- | --------
19+
`bigquery.datasets.get` | This allows Segment to determine if the `__segment_reverse_etl` dataset exists.
20+
`bigquery.tables.create` | This allows Segment to determine if the tables Segment uses to track state in the `__segment_reverse_etl` dataset exists.
21+
`bigquery.jobs.create` | This allows Segment to execute queries on any datasets or tables your model query references, and also allows Segment to manage tables used for tracking.
22+
23+
The `bigquery.datasets.*` permissions can be scoped only to the `__segment_reverse_etl` dataset.
624

725
## Create service account
826

@@ -23,35 +41,14 @@ To set up the Segment BigQuery connector:
2341
11. Click **Add Key > Create new key**.
2442
12. In the pop-up window, select **JSON** for the key type and click **Create**. The file will download.
2543

26-
## Constructing your own role or policy
27-
When you construct your own role or policy, Segment needs the following permissions:
28-
29-
Permission | Details
30-
---------- | --------
31-
`bigquery.datasets.create` | This allows Segment to create/manage a `__segment_reverse_etl` dataset for tracking state between syncs.
32-
`bigquery.datasets.get` | This allows Segment to determine if the aforementioned dataset exists.
33-
`bigquery.jobs.create` | This allows Segment to execute queries on any datasets or tables your model query references, and also allows Segment to manage tables used for tracking.
34-
35-
If you don't want to grant Segment `bigquery.datasets.create` access, you can create your own `__segment_reverse_etl` dataset and give Segment the following permissions:
36-
37-
Permission | Details
38-
---------- | --------
39-
`bigquery.datasets.get` | This allows Segment to determine if the `__segment_reverse_etl` dataset exists.
40-
`bigquery.tables.create` | This allows Segment to determine if the tables Segment uses to track state in the `__segment_reverse_etl` dataset exists.
41-
`bigquery.jobs.create` | This allows Segment to execute queries on any datasets or tables your model query references, and also allows Segment to manage tables used for tracking.
42-
43-
The `bigquery.datasets.*` permissions can be scoped only to the `__segment_reverse_etl` dataset.
44-
45-
After you've successfully added your BigQuery source, [add a model](/docs/connections/reverse-etl/setup/#step-2-add-a-model) and follow the rest of the steps in the Reverse ETL setup guide.
46-
4744
## Set up BigQuery as your Reverse ETL source
4845
1. Copy all the content within the **JSON** file created and downloaded in previous section.
4946
2. Navigate to the Segment UI and paste all the credentials you copied from previous step into the **Enter your credentials** section.
5047
3. Enter your **Data Location**.
5148
4. 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.
5249
5. Click **Add source** if the test connection is successful.
5350

54-
After you've added BigQuery as a source, you can [add a model](/docs/connections/reverse-etl/setup/#step-2-add-a-model).
51+
After you've added BigQuery as a source, you can [add a model](/docs/connections/reverse-etl/setup/#step-2-add-a-model) and follow the rest of the steps in the Reverse ETL setup guide.
5552

5653
> info "BigQuery Reverse ETL sources support Segment's dbt extension"
5754
> If you have an existing dbt account with a Git repository, you can use [Segment's dbt extension](/docs/segment-app/extensions/dbt/) to centralize model management and versioning, reduce redundancies, and run CI checks to prevent breaking changes.

0 commit comments

Comments
 (0)