-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add location property to BigQuery data source settings #2513
Add location property to BigQuery data source settings #2513
Conversation
b86bb16
to
bd1c5fa
Compare
Thanks kyoshidajp! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @kyoshidajp! Please see comments.
redash/query_runner/big_query.py
Outdated
@@ -148,10 +155,15 @@ def _get_bigquery_service(self): | |||
def _get_project_id(self): | |||
return self.configuration["projectId"] | |||
|
|||
def _get_location(self): | |||
location = self.configuration.get("location", "") | |||
return "US" if location == "" else location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can simplify this into:
def _get_location(self):
return self.configuration.get("location", "US")
No?
redash/query_runner/big_query.py
Outdated
@@ -110,6 +113,10 @@ def configuration_schema(cls): | |||
"type": "boolean", | |||
'title': "Use Standard SQL (Beta)", | |||
}, | |||
'location': { | |||
"type": "string", | |||
'title': 'Processing Location (default: US)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For default values we have the default
property of the configuration item.
889aeda
to
5ca59a5
Compare
@arikfr Thanks. I fixed. Could you review again? |
Thanks! |
Feature
BigQuery began to support Tokyo region from April this year.
This PR adds a location property to BigQuery data source settings. And calls job query with it.
If it is not specified, the value is
US
(which is default BigQuery location).Screenshot