Skip to content

Update BigQueryCreateExternalTableOperator doc and parameters#18676

Merged
uranusjr merged 2 commits into
apache:mainfrom
tnyz:improve-gcp-bq-external-table-operator-parameter
Oct 28, 2021
Merged

Update BigQueryCreateExternalTableOperator doc and parameters#18676
uranusjr merged 2 commits into
apache:mainfrom
tnyz:improve-gcp-bq-external-table-operator-parameter

Conversation

@tnyz

@tnyz tnyz commented Oct 1, 2021

Copy link
Copy Markdown
Contributor

Update parameter to reflect expected usage while maintaining backwards compatibility.

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
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.

@tnyz
tnyz requested a review from turbaszek as a code owner October 1, 2021 17:18
@boring-cyborg boring-cyborg Bot added area:providers provider:google Google (including GCP) related issues labels Oct 1, 2021
@github-actions github-actions Bot added the okay to merge It's ok to merge this PR as it does not require more tests label Oct 1, 2021
@github-actions

github-actions Bot commented Oct 1, 2021

Copy link
Copy Markdown
Contributor

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

Comment on lines +1149 to +1152
if not bucket:
raise ValueError("`bucket` is required when not using `table_resource`.")
if not source_objects:
raise ValueError("`source_objects` is required when not using `table_resource`.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be TypeError IMO.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ValueError is more correct.

Passing arguments of the wrong type (e.g. passing a list when an int is expected) should result in a TypeError, but passing arguments with the wrong value (e.g. a number outside expected boundaries) should result in a ValueError.

This case is more of "wrong arguments" not "arguments types".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Tomek. Value error is good here.

@potiuk potiuk closed this Oct 9, 2021
@potiuk potiuk reopened this Oct 9, 2021
@potiuk

potiuk commented Oct 9, 2021

Copy link
Copy Markdown
Member

Reopened to rebuild

@potiuk

potiuk commented Oct 9, 2021

Copy link
Copy Markdown
Member

Static checks failing

@tnyz tnyz closed this Oct 11, 2021
@tnyz tnyz reopened this Oct 11, 2021
@tnyz

tnyz commented Oct 22, 2021

Copy link
Copy Markdown
Contributor Author

can someone with write access review and close this pr? thanks

@tnyz
tnyz requested review from potiuk and uranusjr October 27, 2021 16:54
@uranusjr
uranusjr merged commit e4aa377 into apache:main Oct 28, 2021
@tnyz
tnyz deleted the improve-gcp-bq-external-table-operator-parameter branch November 1, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants