Repository navigation
Build the ADBC database URI from the connection fields - #74454
Merged
Merged
Conversation
…low's connection URI AdbcHook.uri handed the driver Airflow's connection URI with the scheme swapped for the dialect. That URI carries the extras in its query string, so a connection with the dialect extra (needed to pick the driver) yields postgresql://user:pass@host/db?dialect=postgresql, which libpq refuses with "invalid URI query parameter". A full URI in the Host field, as the docs describe, was percent-encoded into the path for the same reason; only hosts containing "::" went through unchanged. The hook now passes a Host that is already a URI or a path through unchanged (``://``, ``::``, or starting with ``/``, ``:`` or ``file:``) and otherwise builds ``<dialect>://login:password@host:port/schema`` from the connection's fields. Port and Schema are no longer hidden in the connection form, since they take part in that URI, and the docs describe the two ways of filling the form.
eladkal
approved these changes
Nov 5, 2026
The ui-field-behaviour change in provider.yaml had not been carried over to the generated get_provider_info.py, which the update-providers-build-files check flagged, and the spellcheck did not know libpq from the new AdbcHook.uri docstring.
dabla
force-pushed
the
fix/adbc-hook-uri
branch
from
November 5, 2026 09:49
4bbadc7 to
e0d2437
Compare
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AdbcHook.urihanded the driver Airflow's connection URI with the scheme swapped for the dialect. That URI carries the extras in its query string, so any connection with thedialectextra (needed to derive the driver name) producedpostgresql://user:pass@host/db?dialect=postgresql, which libpq refuses:A full URI in the Host field, as the connection docs describe, was percent-encoded into the path for the same reason (
postgresql://postgresql%3A%2F%2Fuser...); only hosts containing::went through unchanged. In practice the released 0.1.0 hook could not reach PostgreSQL without repeating the URI, password included, indb_kwargs.This PR:
://,::, or starting with/,:orfile:), and otherwise builds<dialect>://login:password@host:port/schemafrom the connection's fields, never fromget_uri();test_uricovering the built URI, extras staying out of it, a URI in Host, and the SQLite in-memory and file forms.Verified against a PostgreSQL 16 with adbc-driver-postgresql 1.12.0: the built URI connects, the previous one fails as quoted above.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
🤖 Generated with Claude Code