-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix overwrite get_uri for Oracle
#48734
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
Conversation
Co-Authored-By: Howard W. Chung <33175898+h30306@users.noreply.github.com>
h30306
left a comment
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.
LGTM
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
|
Thanks for your reviewing, I have updated the PR with you suggestion! |
423199b to
701b4c1
Compare
|
left one nit, almost good to merge 👍 |
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
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.
Nice! Thanks for the PR.
|
Thanks for reviewing! |
get-uri for Oracleget_uri for Oracle
|
@guan404ming @Lee-W @h30306 This (merged) PR raised some questions. If may not be correct since it doesn't follow documented SQLAlchemy connection syntax for the python-oracledb driver.
Code should be like: |
|
Thanks for pointing out, I've open a PR for the fix. Please take another look if available, thanks! |
get_uri for Oracleget_uri for Oracle
Related Issue
Towards #38195
Why
The base
DbApiHook.get_uriincorrectly assumes that Airflow connection URI representation is a valid SQLAlchemy URI, but this is not always true, especially for complex cases. For Oracle connections, the URI format needs to handle various connection scenarios including SID, service name, and PDB configurations.This PR implements a proper
get_urimethod for theOracleHookclass, ensuring that Oracle connection URIs are correctly formatted according to Oracle's connection string requirements.How
get_urimethod inOracleHookto properly generate Oracle connection URIsRef: https://docs.oracle.com/en/database/other-databases/essbase/21/essoa/connection-string-formats.html
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.