From f4dcff19c735c5da5139771180839e0f23457bdb Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 20 Feb 2025 14:28:31 +0100 Subject: [PATCH 1/2] fix: Pass through BigQuery Config in multithreaded worker (closes #2298) --- firestore-bigquery-export/scripts/import/src/worker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firestore-bigquery-export/scripts/import/src/worker.ts b/firestore-bigquery-export/scripts/import/src/worker.ts index 23e9a9065..19c80c6d1 100644 --- a/firestore-bigquery-export/scripts/import/src/worker.ts +++ b/firestore-bigquery-export/scripts/import/src/worker.ts @@ -26,6 +26,7 @@ async function processDocuments( tableId, datasetId, datasetLocation, + bigQueryProjectId, batchSize, failedBatchOutput, } = config; @@ -71,6 +72,7 @@ async function processDocuments( datasetId, datasetLocation, wildcardIds: true, + bqProjectId: bigQueryProjectId, skipInit: true, useNewSnapshotQuerySyntax: config.useNewSnapshotQuerySyntax, transformFunction: config.transformFunctionUrl, From 52129d76a52a691cd71755cd6c2aa24d1e47ea79 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 21 Feb 2025 10:03:19 +0100 Subject: [PATCH 2/2] fix: pass bqprojectId if view exists as well --- .../src/bigquery/initializeLatestView.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/initializeLatestView.ts b/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/initializeLatestView.ts index 8e017397b..2966962f6 100644 --- a/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/initializeLatestView.ts +++ b/firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/initializeLatestView.ts @@ -87,6 +87,7 @@ export async function initializeLatestView({ metadata.view = latestConsistentSnapshotView({ datasetId: config.datasetId, tableName: rawChangeLogTableName, + bqProjectId: bq.projectId, schema, useLegacyQuery: !config.useNewSnapshotQuerySyntax, });