[go: up one dir, main page]

Skip to content

Commit

Permalink
fix: set projectId in jobs emitted by load streams (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
1kilobit committed Mar 27, 2024
1 parent a6498c4 commit bd8254c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/table.ts
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions test/table.ts
Expand Up @@ -1783,6 +1783,7 @@ describe('BigQuery/Table', () => {
jobReference: {
jobId: 'job-id',
location: 'location',
projectId: 'project-id',
},
a: 'b',
c: 'd',
Expand All @@ -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;
};
Expand Down

0 comments on commit bd8254c

Please sign in to comment.