You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/28 22:08:44 UTC

[GitHub] [airflow] akashgangulyhf opened a new issue, #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #25388:
URL: https://github.com/apache/airflow/issues/25388#issuecomment-1198679027

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk closed issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error
URL: https://github.com/apache/airflow/issues/25388


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #25388:
URL: https://github.com/apache/airflow/issues/25388#issuecomment-1199028242

   Don't use constraints for that @akashgangulyhf. See https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html#installing-upgrading-downgrading-providers-separately-from-airflow-core


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] FanatoniQ commented on issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
FanatoniQ commented on issue #25388:
URL: https://github.com/apache/airflow/issues/25388#issuecomment-1200452659

   @potiuk @akashgangulyhf  I just want to point out that this isn't related to the `jaydebeapi` driver.
   
   Currently any sql providers using the `fetch_all_handler` will fail since https://github.com/apache/airflow/pull/23971/files#diff-6e1b2f961cb951d05d66d2d814ef5f6d8f8bf8f43c40fb5d40e27a031fed8dd7R35 change to the `fetch_all_handler` implementation, making the handler non dbapi2 compliant but only compatible with sqlalchemy (we do not use `sqlalchemy` in `DbApiHook.run`).


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] akashgangulyhf commented on issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
akashgangulyhf commented on issue #25388:
URL: https://github.com/apache/airflow/issues/25388#issuecomment-1199030007

   I see, let me see if I can go with that approach. Thanks.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #25388:
URL: https://github.com/apache/airflow/issues/25388#issuecomment-1199023512

   @kazanzhy ->  maybe you can help? (In the meantime @akashgangulyhf ->  you can always downgrade the provider to previous version - this is the nice thing about providers that you can downgrade them individuall if you see error even if "blessed" version is different.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] akashgangulyhf commented on issue #25388: apache-airflow-providers-jdbc fails with jaydebeapi.Error

Posted by GitBox <gi...@apache.org>.
akashgangulyhf commented on issue #25388:
URL: https://github.com/apache/airflow/issues/25388#issuecomment-1199024799

   Hi @potiuk , Thanks for picking this up. I tried doing so but we have a dependency check with the constraint file and Airflow 2.3.3 doesn't allow <3.0.0 for jdbc operator


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org