Conversation
adbc_driver_entrypoint() returned None for Athena. The ADBC driver manager derives `Adbc<Name>Init` from the library name in that case, and this was verified empirically: a binary WITHOUT this mapping found target/release/lib/libadbc_driver_athena.dylib, initialized the driver, and proceeded to option parsing. So the mapping is not required for the load to succeed. It is kept for the same reason Snowflake has an explicit `SnowflakeDriverInit`: the symbol is a contract with a separately released driver (github.com/dbt-labs/athena, generated with `-prefix Athena`, which exports AdbcDriverAthenaInit and does NOT export the generic AdbcDriverInit — confirmed with nm), and naming it here makes that contract greppable rather than implicit in a filename convention. An earlier version of this message claimed the load fails without the mapping. That was wrong. For the record, how the library is found on macOS arm64 (try_load_driver_from_name): linker defaults, then a `lib/` directory found by climbing up to five levels from the executable's directory, then /opt/homebrew/lib. `target/release/lib/libadbc_driver_athena.dylib` works with no system directory and no environment variable — verified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…location The Fusion side sent `athena.s3_staging_dir`; the driver (github.com/dbt-labs/athena, driver.go:39 `OptionOutputLocation`) accepts `athena.output_location` and rejects the other with "Unknown database option". Found by loading the locally built driver: the connection attempt failed on this key before reaching AWS. After this change the set of `athena.*` keys Fusion sends is identical to the set the driver accepts (10/10, checked by grep on both trees). The Rust constant keeps its name, S3_STAGING_DIR, because callers in dbt-auth read it against the dbt profile field of that name; only the wire value changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @aoelvp94 |
done, check |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Part of #16252. Related: #13822. Independent PR; the sequence is at the bottom.
Problem
Two gaps between
dbt-adbcand thedbt-labs/athenaGo driver:Backend::Athenahas no explicit entrypoint mapping. The driver manager derivesAdbcAthenaInitfrom the filename, which happens to work, but every other backend maps itsAdbc<Name>Initsymbol explicitly (Snowflake precedent) and the derived form breaks if the library is ever renamed.athena.s3_staging_dir. The driver readsathena.output_location(go/driver.go), so the profile'ss3_staging_dirnever reached it and every query failed on a missing output location.Solution
driver.rs:Backend::Athena => "AdbcDriverAthenaInit"next to the other explicit mappings.athena.rs: one constant renamed so the option key matches the driver. The other nine option keys already match.No behaviour change for any other backend. Per
.agents/adapters.md,dbt-adbctakes no new functionality; this touches only an option-key constant and one entry in the existing entrypoint map.Verification
With driver v0.1.0 built from
dbt-labs/athena(cd go/pkg && make) and placed underlib/next to the binary,dbt debugon anathenaprofile loads the driver and completes the connection test. Before this change it failed with a missing output location.cargo fmt --check,cargo clippy -p dbt-adbc --all-targets --all-featuresclean on the pinned toolchain.Feedback wanted: whether the explicit entrypoint mapping is wanted at all, given the filename-derived one works.
Sequence (independent PRs, each compiles alone against main)
table/incrementalhelpers (athena/parts-6-7-execution); see also feat(athena): Part 6 — AthenaAdapter methods behind the dbt-athena macros #16376Checklist