kaxil commented on a change in pull request #3901: [AIRFLOW-2772] BigQuery hook
allow specifying both the partition fiel…
URL: https://github.com/apache/incubator-airflow/pull/3901#discussion_r217645701
##########
File path: airflow/contrib/hooks/bigquery_hook.py
##########
@@ -1662,11 +1662,8 @@ def
_cleanse_time_partitioning(destination_dataset_table, time_partitioning_in):
time_partitioning_out = {}
if destination_dataset_table and '$' in destination_dataset_table:
- if time_partitioning_in.get('field'):
- raise ValueError(
- "Cannot specify field partition and partition name"
- "(dataset.table$partition) at the same time")
- time_partitioning_out['type'] = 'DAY'
+ if not time_partitioning_in.get('field') and not
time_partitioning_in.get("type"):
Review comment:
I don't think we need this check. If `$` is present in table name, it should
be partitioned by `DAY` as I guess "The only type supported is DAY, which will
generate one partition per day."
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services