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: firestore-bigquery-export/POSTINSTALL.md
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,30 +4,30 @@ You can test out this extension right away!
4
4
5
5
1. Go to your [Cloud Firestore dashboard](https://console.firebase.google.com/project/${param:BIGQUERY_PROJECT_ID}/firestore/data) in the Firebase console.
6
6
7
-
1. If it doesn't already exist, create the collection you specified during installation: `${param:COLLECTION_PATH}`
7
+
2. If it doesn't already exist, create the collection you specified during installation: `${param:COLLECTION_PATH}`
8
8
9
-
1. Create a document in the collection called `bigquery-mirror-test` that contains any fields with any values that you'd like.
9
+
3. Create a document in the collection called `bigquery-mirror-test` that contains any fields with any values that you'd like.
10
10
11
-
1. Go to the [BigQuery web UI](https://console.cloud.google.com/bigquery?project=${param:BIGQUERY_PROJECT_ID}&p=${param:BIGQUERY_PROJECT_ID}&d=${param:DATASET_ID}) in the Google Cloud Platform console.
11
+
4. Go to the [BigQuery web UI](https://console.cloud.google.com/bigquery?project=${param:BIGQUERY_PROJECT_ID}&p=${param:BIGQUERY_PROJECT_ID}&d=${param:DATASET_ID}) in the Google Cloud Platform console.
12
12
13
-
1. Query your **raw changelog table**, which should contain a single log of creating the `bigquery-mirror-test` document.
13
+
5. Query your **raw changelog table**, which should contain a single log of creating the `bigquery-mirror-test` document.
14
14
15
15
```
16
16
SELECT *
17
17
FROM `${param:BIGQUERY_PROJECT_ID}.${param:DATASET_ID}.${param:TABLE_ID}_raw_changelog`
18
18
```
19
19
20
-
1. Query your **latest view**, which should return the latest change event for the only document present -- `bigquery-mirror-test`.
20
+
6. Query your **latest view**, which should return the latest change event for the only document present -- `bigquery-mirror-test`.
21
21
22
22
```
23
23
SELECT *
24
24
FROM `${param:BIGQUERY_PROJECT_ID}.${param:DATASET_ID}.${param:TABLE_ID}_raw_latest`
25
25
```
26
26
27
-
1. Delete the `bigquery-mirror-test` document from [Cloud Firestore](https://console.firebase.google.com/project/${param:BIGQUERY_PROJECT_ID}/firestore/data).
27
+
7. Delete the `bigquery-mirror-test` document from [Cloud Firestore](https://console.firebase.google.com/project/${param:BIGQUERY_PROJECT_ID}/firestore/data).
28
28
The `bigquery-mirror-test` document will disappear from the **latest view** and a `DELETE` event will be added to the **raw changelog table**.
29
29
30
-
1. You can check the changelogs of a single document with this query:
30
+
8. You can check the changelogs of a single document with this query:
31
31
32
32
```
33
33
SELECT *
@@ -58,33 +58,39 @@ Enabling wildcard references will provide an additional STRING based column. The
58
58
59
59
By default, the extension exports data to BigQuery in the same project as your Firebase project. However, you can configure it to export to a BigQuery instance in a different Google Cloud project. To do this:
60
60
61
-
1. During installation, set the `BIGQUERY_PROJECT_ID` parameter to your target BigQuery project ID.
61
+
1. During installation, set the `BIGQUERY_PROJECT_ID` parameter as your target BigQuery project ID.
62
62
63
-
2. After installation, you'll need to grant the extension's service account the necessary BigQuery permissions on the target project. You can use our provided scripts:
63
+
2. Identify the service account on the source project associated with the extension. By default, it will be constructed as `ext-<extension-instance-id>@project-id.iam.gserviceaccount.com`. However, if the extension instance ID is too long, it may be truncated and 4 random characters appended to abide by service account length limits.
64
+
65
+
3. To find the exact service account, navigate to IAM & Admin -> IAM in the Google Cloud Platform Console. Look for the service account listed with "Name" as "Firebase Extensions <your extension instance ID> service account". The value in the "Principal" column will be the service account that needs permissions granted in the target project.
66
+
67
+
4. Grant the extension's service account the necessary BigQuery permissions on the target project. You can use our provided scripts:
0 commit comments