Skip to content

Conversation

@dabla
Copy link
Contributor

@dabla dabla commented Feb 4, 2025

This PR implements a PEP 249-like cursor (e.g. ElasticsearchSQLCursor) so the ElasticsearchSQLHook (which is a specialization of the DbApiHook) can be used through the SQLExecuteQueryOperator.

The issue is that the TestElasticsearchSQLHook mocks the cursor and thus gives the impression the ESConnection has a cursor available which is internally used by the run method of the DbApiHook but in reality doesn't exist, this means at runtime the SQLExecuteQueryOperator will fail.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@dabla dabla marked this pull request as draft February 5, 2025 08:00
@dabla dabla marked this pull request as ready for review February 5, 2025 13:45
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce. Like it a lot.

@potiuk potiuk merged commit a057b95 into apache:main Feb 5, 2025
61 checks passed
insomnes pushed a commit to insomnes/airflow that referenced this pull request Feb 6, 2025
… SQLExecuteQueryOperator (apache#46439)



---------

Co-authored-by: David Blain <david.blain@infrabel.be>
niklasr22 pushed a commit to niklasr22/airflow that referenced this pull request Feb 8, 2025
… SQLExecuteQueryOperator (apache#46439)



---------

Co-authored-by: David Blain <david.blain@infrabel.be>
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Feb 17, 2025
… SQLExecuteQueryOperator (apache#46439)



---------

Co-authored-by: David Blain <david.blain@infrabel.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants