akashgangulyhf opened a new issue, #25388:
URL: https://github.com/apache/airflow/issues/25388

   ### 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](https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-3.10.txt)
 
   
   
   
   ### 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
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to