From 961246753803cc5e4ea03b5fae745ed95c5df754 Mon Sep 17 00:00:00 2001 From: onekilobit <113723852+onekilobit-supersocial@users.noreply.github.com> Date: Tue, 26 Mar 2024 18:18:19 -0700 Subject: [PATCH 1/2] fix: set projectId in jobs emitted by load streams --- src/table.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/table.ts b/src/table.ts index 4dfe07923..6897bebb5 100644 --- a/src/table.ts +++ b/src/table.ts @@ -1554,6 +1554,7 @@ class Table extends ServiceObject { (data: any) => { const job = this.bigQuery.job(data.jobReference.jobId, { location: data.jobReference.location, + projectId: data.jobReference.projectId, }); job.metadata = data; dup.emit('job', job); From 382042ff678dca8346a6fe148cc2aed6f7d5b8b6 Mon Sep 17 00:00:00 2001 From: onekilobit <113723852+onekilobit-supersocial@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:10:12 -0700 Subject: [PATCH 2/2] test: expect projectId in emitted load stream jobs --- test/table.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/table.ts b/test/table.ts index 11322410e..84d71ce5e 100644 --- a/test/table.ts +++ b/test/table.ts @@ -1783,6 +1783,7 @@ describe('BigQuery/Table', () => { jobReference: { jobId: 'job-id', location: 'location', + projectId: 'project-id', }, a: 'b', c: 'd', @@ -1792,6 +1793,7 @@ describe('BigQuery/Table', () => { assert.strictEqual(id, metadata.jobReference!.jobId); assert.deepStrictEqual(options, { location: metadata.jobReference!.location, + projectId: metadata.jobReference!.projectId, }); return fakeJob; };