-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Use python client in BQ hook create_empty_table/dataset and table_exists #8377
Use python client in BQ hook create_empty_table/dataset and table_exists #8377
Conversation
|
||
table_resource = { | ||
_table_resource: Dict[str, Any] = { |
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.
(With an eye to minimizing diff to make this easier to review), is there a reason to rename this variable?
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.
The reason is this line:
table_resource = table_resource or _table_resource
I wanted to avoid adding a big if clause and building this simple dictionray everytime is not a big performance issue I think.
table_id="test_view", | ||
view={ | ||
"query": "SELECT * FROM `{}.test_table`".format(DATASET_NAME), | ||
"query": f"SELECT * FROM `{PROJECT_ID}.{DATASET_NAME}.test_table`", |
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.
Are we using legacy SQL or current SQL here?
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.
As you can see line below:
"useLegacySql": False
5b03d3a
to
dedeef5
Compare
@deJong would you like to take a look? |
I've run system test (without check operators that are broken on master) and it succeded. |
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.