-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Add schema override in DbApiHook #16521
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests?
Closes: #16520 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner IMO!
@LukeHong can you try to rebase to master? Pylint is failing but likely not due to your changes. |
e11986d
to
b0c8900
Compare
Update: fix tests |
Awesome work, congrats on your first merged pull request! |
@LukeHong Thanks for the contribution! :) |
There was a change in apache#16521 that introduced schema field in DBApiHook, but unfortunately using it in provider Hooks deriving from DBApiHook is backwards incompatible for Airflow 2.1 and below. This caused Postgres 2.1.0 release backwards incompatibility and failures for Airflow 2.1.0. Since the change is small and most of DBApi-derived hooks already set the schema field on their own, the best approach is to make the schema field private for the DBApiHook and make a change in Postgres Hook to store the schema in the same way as all other operators. Fixes: apache#17422
There was a change in apache#16521 that introduced schema field in DBApiHook, but unfortunately using it in provider Hooks deriving from DBApiHook is backwards incompatible for Airflow 2.1 and below. This caused Postgres 2.1.0 release backwards incompatibility and failures for Airflow 2.1.0. Since the change is small and most of DBApi-derived hooks already set the schema field on their own, the best approach is to make the schema field private for the DBApiHook and make a change in Postgres Hook to store the schema in the same way as all other operators. Fixes: apache#17422
There was a change in #16521 that introduced schema field in DBApiHook, but unfortunately using it in provider Hooks deriving from DBApiHook is backwards incompatible for Airflow 2.1 and below. This caused Postgres 2.1.0 release backwards incompatibility and failures for Airflow 2.1.0. Since the change is small and most of DBApi-derived hooks already set the schema field on their own, the best approach is to make the schema field private for the DBApiHook and make a change in Postgres Hook to store the schema in the same way as all other operators. Fixes: #17422
closes: #16520
Overwrite
get_uri()
from DbApiHook to useschema
argument in PostgresHook.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.