Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery: Add default location to Client #5148

Closed
tswast opened this issue Apr 4, 2018 · 2 comments
Closed

BigQuery: Add default location to Client #5148

tswast opened this issue Apr 4, 2018 · 2 comments
Assignees
Labels
api: bigquery Issues related to the BigQuery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tswast
Copy link
Contributor

tswast commented Apr 4, 2018

It is potentially quite cumbersome to pass in a location parameter to nearly every API request method. It would be nice to set a default location when you create a client to be used when creating datasets or jobs.

@tswast tswast added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigquery Issues related to the BigQuery API. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 4, 2018
@tswast
Copy link
Contributor Author

tswast commented Apr 4, 2018

I imagine the number of defaults we'd want to set will grow (encryption configuration, maximum bytes billed, etc.) but location is basically a peer to project, so it makes sense to me to handle it in the same way.

tseaver added a commit that referenced this issue Jul 25, 2018
* Add read-only 'Client.location' property.

Settable via new 'location' argument to ctor.

* Use 'Client.location' as default for 'Client._get_query_results'.

* Use 'Client.location' as default for 'Client.get_job'.

* Use 'Client.location' as default for 'Client.cancel_job'.

* Use 'Client.location' as default for 'Client.load_table_from_uri'.

* Use 'Client.location' as default for 'Client.load_table_from_file'.

* Use 'Client.location' as default for 'Client.load_table_from_dataframe'.

* Use 'Client.location' as default for 'Client.copy_table'.

* Use 'Client.location' as default for 'Client.extract_table'.

* Use 'Client.location' as default for 'Client.query'.

* Use 'Client.location' as default default for 'create_dataset'.

Closes #5148.
@tswast
Copy link
Contributor Author

tswast commented Jul 25, 2018

🎉 Thanks Tres!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants