Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate YDB Operator to new DBAPI #43784

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Conversation

vgvoleg
Copy link
Contributor

@vgvoleg vgvoleg commented Nov 7, 2024

For historical reasons, the YDB operator had a copied DBAPI from the ydb-platform/ydb-sqlalchemy repository. It was impossible to use it without copying - the repository has a dependency on SQLAlchemy > 2.0. (problem was described here https://github.com/apache/airflow/blob/995cd8fba8de4ab3d041c7e141a0b92d786a8277/providers/src/airflow/providers/ydb/hooks/_vendor/readme.md)

At the moment we split the DBAPI and SQLAlchemy Dialect, so now there are no conflicts between them.

In this pull request, we delete the copied files, adding a new dependency on the ydb-dbapi package, and also adapt the current YDB Operator to the new dbapi.

YDBScanQueryOperator was more of an experiment, the new YDBExecuteQueryOperator on top of the new dbapi covers all scenarios - no need to stop it (as far as I know, none of our users have started using it)


^ 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.

@vgvoleg vgvoleg changed the title Migrate YDB Operator to new DBAPI DRAFT: Migrate YDB Operator to new DBAPI Nov 7, 2024
@vgvoleg vgvoleg force-pushed the update_ydb_provider branch 3 times, most recently from 9725aff to 7719e97 Compare November 7, 2024 15:20
@vgvoleg vgvoleg changed the title DRAFT: Migrate YDB Operator to new DBAPI Migrate YDB Operator to new DBAPI Nov 7, 2024
@potiuk
Copy link
Member

potiuk commented Nov 11, 2024

Nice set of changes BTW :)

@potiuk potiuk merged commit cf3d55d into apache:main Nov 12, 2024
108 checks passed
sunank200 pushed a commit to astronomer/airflow that referenced this pull request Nov 12, 2024
* Migrate YDB Operator to new DBAPI

* Update changelog
Comment on lines +30 to +33
.. note::
This release removes YDBScanQueryOperator from this provider package.
At this point, YDBExecuteQueryOperator could load unlimited amount of rows, so no specific operator is needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

is this a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we've deleted operator that was added in prev release. I'm pretty sure that no customers used it.

ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* Migrate YDB Operator to new DBAPI

* Update changelog
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.

5 participants