Skip to content

Commit

Permalink
fix(bigquery): use JobFromProject for storage iterator (#8372)
Browse files Browse the repository at this point in the history
There's no guarantee that the provided client is in the same project or location as the job, so those details need to also be provided from the job object

Co-authored-by: Alvaro Viebrantz <aviebrantz@google.com>
  • Loading branch information
derekperkins and alvarowolfx committed Aug 2, 2023
1 parent b4349cc commit bfbf18c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bigquery/storage_iterator.go
Expand Up @@ -67,7 +67,7 @@ func newStorageRowIteratorFromTable(ctx context.Context, table *Table, ordered b

func newStorageRowIteratorFromJob(ctx context.Context, j *Job) (*RowIterator, error) {
// Needed to fetch destination table
job, err := j.c.JobFromID(ctx, j.jobID)
job, err := j.c.JobFromProject(ctx, j.projectID, j.jobID, j.location)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit bfbf18c

Please sign in to comment.