The project in which a dataset resides is not necessarily the project in which jobs involving the dataset will be executed. For example, if querying the bigquery public data hacker news dataset the following will error
client = bigquery.Client(project='bigquery-public-data')
dataset = client.dataset('hacker_news')
client.extract_table_storage(..., dataset.table('comments'))
Because the user can't create a job in the project 'bigquery-public-data'. Instead the fairly convoluted:
client = bigquery.Client(project='my-project')
client.extract_table_storage(..., bigquery.Client(project='bigquery-public-data').dataset('hacker_news').table('comments'))
Despite the fact that the client involved will never be used.
The proposed fix is to add a kwarg project to the Dataset class which overrides the originating project.
The project in which a dataset resides is not necessarily the project in which jobs involving the dataset will be executed. For example, if querying the bigquery public data hacker news dataset the following will error
Because the user can't create a job in the project 'bigquery-public-data'. Instead the fairly convoluted:
Despite the fact that the client involved will never be used.
The proposed fix is to add a kwarg
projectto the Dataset class which overrides the originating project.