Skip to content

Commit bd8254c

Browse files
authored
fix: set projectId in jobs emitted by load streams (#1346)
1 parent a6498c4 commit bd8254c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/table.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,7 @@ class Table extends ServiceObject {
15541554
(data: any) => {
15551555
const job = this.bigQuery.job(data.jobReference.jobId, {
15561556
location: data.jobReference.location,
1557+
projectId: data.jobReference.projectId,
15571558
});
15581559
job.metadata = data;
15591560
dup.emit('job', job);

test/table.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1783,6 +1783,7 @@ describe('BigQuery/Table', () => {
17831783
jobReference: {
17841784
jobId: 'job-id',
17851785
location: 'location',
1786+
projectId: 'project-id',
17861787
},
17871788
a: 'b',
17881789
c: 'd',
@@ -1792,6 +1793,7 @@ describe('BigQuery/Table', () => {
17921793
assert.strictEqual(id, metadata.jobReference!.jobId);
17931794
assert.deepStrictEqual(options, {
17941795
location: metadata.jobReference!.location,
1796+
projectId: metadata.jobReference!.projectId,
17951797
});
17961798
return fakeJob;
17971799
};

0 commit comments

Comments
 (0)