Conversation
Add the `athena` variant of `DbConfig` so Athena profiles parse and reach
the experimental-adapter gate and `dbt-auth`, which already carry the
Athena pieces (`AdapterType::Athena`, `Backend::Athena`, `AthenaAuth`).
`AthenaDbConfig` declares every field of dbt-athena's `AthenaCredentials`,
including the ones `AthenaAuth` rejects today: the auth layer reads the
profile through `to_mapping()`, so an undeclared field would be dropped
silently instead of raising the "not yet supported" error. `catalog` is
accepted as an alias of `database`, matching dbt-athena.
`connection_keys_for(Athena)` lists the honoured, non-secret keys.
`TargetContext::Athena` exposes `region_name`, `s3_staging_dir`,
`work_group`, `aws_profile_name` and the common fields, with `database`
defaulting to `awsdatacatalog` as in `AthenaAuth`; threads parsing goes
through `threads_from_profile`.
The relation factory builds the generic `RelationStatic` for Athena, as
for every other adapter, so `dbt parse` and `dbt ls` stop at a
configuration error naming the missing `dbt-athena` macro package instead
of a `todo!` panic.
Athena stays outside `NON_EXPERIMENTAL_ADAPTERS`. The remaining
`todo!("Athena")` arms in `dbt-adapter` and the macro package are left
for follow-ups.
Resolves dbt-labs#16252
Fills the last todo!("Athena"), in dbt-init's profile setup, so `dbt init`
can create and update an Athena profile.
`AthenaDbConfig` gains an `InteractiveSetup` in dbt-profile-schemas, shaped
like the Exasol and BigQuery ones. The prompt set and defaults follow
dbt-athena's profile_template.yml (region, staging dir, optional data dir,
catalog defaulting to awsdatacatalog, schema, threads 1), plus an optional
workgroup and an auth-method selector the template lacks because it assumes
ambient credentials:
- default credential chain (nothing written),
- named AWS profile (`aws_profile_name`),
- access key pair (`aws_access_key_id`, `aws_secret_access_key`, optional
`aws_session_token`), secrets prompted as passwords.
Picking a method clears the other methods' fields. AthenaAuth resolves keys
before a profile name, so a stale pair left in an edited profile would
silently override the chosen profile.
Athena joins the adapter list in dbt-init and the headless (non-interactive)
API in dbt-profile-schemas, with the same threads default.
Tests cover the headless path, which shares the field logic with the wizard
and needs no terminal: default chain writes no credentials and ignores the
conditional prompts, each method collects only its own fields, and switching
method on an existing profile drops the previous credentials.
Verified with `cargo test --release -p dbt-profile-schemas` (4 passed) and
`cargo clippy --release -p dbt-profile-schemas -p dbt-init --all-targets
--all-features` clean for both crates.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 19, 2026
This was referenced Sep 19, 2026
4 tasks
This branch has not been deployed
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.
Part of #16252. Related: #13822. Built on top of #16274 because it needs
AthenaDbConfig; the first commit in this PR is that one, review the last 2. If #16274 merges first, a rebase drops it.Problem
dbt initwith Athena selected panics on the lasttodo!("Athena"), indbt-init's profile setup. Athena is also absent from the adapter list and from the headless profile API.Solution
AthenaDbConfiggains anInteractiveSetupindbt-profile-schemas, shaped like the Exasol and BigQuery ones. Prompts and defaults follow dbt-athena'sprofile_template.yml(region, staging dir, optional data dir, catalog defaulting toawsdatacatalog, schema,threads: 1), plus an optional workgroup and an auth-method selector the template lacks because it assumes ambient credentials: default credential chain, named AWS profile, or access key pair with secrets prompted as passwords. Choosing a method clears the other methods' fields, becauseAthenaAuthresolves keys before a profile name and a stale pair in an edited profile would silently win.Athena joins
get_available_adapters()indbt-initandsupported_adapters()/build_profile_target()in the headless API.Verification
cargo nextest run -p dbt-profile-schemas: four tests on the headless path, which shares the field logic with the wizard and needs no terminal: default chain writes no credentials and ignores the conditional prompts; each method collects only its own fields; switching method on an existing profile drops the previous credentials.cargo clippy -p dbt-profile-schemas -p dbt-init --all-targets --all-featuresclean.Feedback wanted:
threadsdefaults to 1 to match dbt-athena's template; the other Fusion wizards default to 16.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