potiuk commented on a change in pull request #18676:
URL: https://github.com/apache/airflow/pull/18676#discussion_r725504879
##########
File path: airflow/providers/google/cloud/operators/bigquery.py
##########
@@ -1142,11 +1142,14 @@ def __init__(
if not table_resource:
warnings.warn(
"Passing table parameters via keywords arguments will be
deprecated. "
- "Please use provide table definition using `table_resource`
parameter."
- "You can still use external `schema_object`. ",
+ "Please use provide table definition using `table_resource`
parameter.",
DeprecationWarning,
stacklevel=2,
)
+ 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`.")
Review comment:
Agree with Tomek. Value error is good here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]