BigQueryToPostgresOperator with replace=True
is not functional
#40189
Labels
area:providers
good first issue
kind:bug
This is a clearly a bug
provider:google
Google (including GCP) related issues
Apache Airflow Provider(s)
google
Versions of Apache Airflow Providers
I am using
10.14.0
but this is true on the latest at the time of writing this issue :
10.19.0
Apache Airflow version
2.6.3
Operating System
macos (local)
Deployment
Google Cloud Composer
Deployment details
No response
What happened
The Postgres SQLHook method for insertion expects the argument
replace_index
if the argumentreplace
isTrue
It is currently not possible to forward it via
kwargs
and therefore thereplace=True
cannot be used.What you think should happen instead
The base class
BigQueryToSqlBaseOperator
does implement accept thereplace
argument and it is indeed taken into account until faced with an error from the PostgresHook :Any attempt to pass the
replace_index
argument is met with a dag parsing error:airflow.exceptions.AirflowException: Invalid arguments were passed to BigQueryToPostgresOperator (task_id: transfer_table_vehicle). Invalid arguments were: **kwargs: {'replace_index': 'vh_license_plate'}
How to reproduce
Any task with
Anything else
This issue is 100% reproducible.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: