I like to pass partition col name to BigQueryOperator istead of using ingestion time partitioned tables.
bq_cmd = BigQueryOperator (
task_id= "task_id",
sql= [query],
destination_dataset_table= destination_tbl,
use_legacy_sql= False,
write_disposition= 'WRITE_TRUNCATE',
time_partitioning= {'time_partitioning_type':'DAY','time_partitioning_field': 'batch_date'},
allow_large_results= True,
trigger_rule= 'all_success',
query_params= query_params,
dag= dag
)
I tried the above way but it did not work and the final table got created with partition col as _PARTITIONTIME instead of batch_date