-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Description
Apache Airflow Provider(s)
jdbc
Versions of Apache Airflow Providers
I am using apache-airflow-providers-jdbc==3.0.0 for Airflow 2.3.3 as per constraint file
Apache Airflow version
2.3.3 (latest released)
Operating System
K8 on Linux
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
What happened
I am using JdbcOperator to execute one ALTER sql statement but it returns the following error:
File "/usr/local/airflow/.local/lib/python3.10/site-packages/airflow/providers/jdbc/operators/jdbc.py", line 76, in execute
return hook.run(self.sql, self.autocommit, parameters=self.parameters, handler=fetch_all_handler)
File "/usr/local/airflow/.local/lib/python3.10/site-packages/airflow/hooks/dbapi.py", line 213, in run
result = handler(cur)
File "/usr/local/airflow/.local/lib/python3.10/site-packages/airflow/providers/jdbc/operators/jdbc.py", line 30, in fetch_all_handler
return cursor.fetchall()
File "/usr/local/airflow/.local/lib/python3.10/site-packages/jaydebeapi/init.py", line 593, in fetchall
row = self.fetchone()
File "/usr/local/airflow/.local/lib/python3.10/site-packages/jaydebeapi/init.py", line 558, in fetchone
raise Error()
jaydebeapi.Error
What you think should happen instead
The introduction of handler=fetch_all_handler in File "/usr/local/airflow/.local/lib/python3.10/site-packages/airflow/providers/jdbc/operators/jdbc.py", line 76, in execute
return hook.run(self.sql, self.autocommit, parameters=self.parameters, handler=fetch_all_handler) is breaking the script. With the previous version which did not have fetch_all_handler in jdbc.py, it was running perfectly.
How to reproduce
Try submitting ALTER statement in airflow jdbcOperator.
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct