feat(sqlserver): Part 9 — dbt init profile wizard - #19
Merged
Conversation
Adds SqlServerDbConfig's InteractiveSetup impl, modeled on fabric_config.rs's auth-branching pattern but covering all four authentication methods dbt-auth/src/sqlserver/mod.rs actually implements (sql, ActiveDirectoryServicePrincipal, ActiveDirectoryPassword, environment) rather than Fabric's pared-down two. Wires SqlServer into get_available_adapters() and the create_profile_for_adapter() match arm. Closes #9
axellpadilla
changed the base branch from
part-8-sqlserver-macros
to
sqlserver-v2-port
August 3, 2026 01:18
4 tasks
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 the SQL Server Fusion adapter Part-series (plan/02-implementation-steps.md §5.3.1). Stacked on #18 (Part 8) since
dbt-inittransitively depends ondbt-loader.What this adds
crates/dbt-init/src/adapter_config/sqlserver_config.rs:InteractiveSetupimpl forSqlServerDbConfig(already defined indbt-schemasfrom Part 2 — no schema changes needed here).AdapterType::SqlServeradded toget_available_adapters()and thecreate_profile_for_adapter()match arm inprofile_setup.rs.adapter_config/mod.rs.Non-mechanical decisions
dbt-authauth methods are exposed, not just the two Fabric's wizard exposes. Fabric'sfabric_config.rscomments outActiveDirectoryPassword("didn't find the right credentials to test it") and has nosqlbranch at all. Both are fully implemented and unit-tested indbt-auth/src/sqlserver/mod.rs'sparse_auth(confirmed by reading it directly), andsqlis v1's actual default auth mode for SQL Server (unlike Fabric, which defaults to Entra). Leaving them out would silently regress wizard coverage below what the adapter can already do.sqlis first in the select list and the wizard default, matching v1's default (sqlserver_credentials.py) rather thandbt-auth'sDEFAULT_AUTHconstant (ActiveDirectoryServicePrincipal, shared with Fabric — changing it would change Fabric's default too, out of scope here per02-implementation-steps.md§5.4's note on the same constant).client_id/user/passwordfields are reused across two auth branches (Service Principal vs. Password) via duplicateConfigFieldentries with different prompts/conditions — same struct field, mutually exclusive display, no ambiguity since only oneauthenticationvalue is ever selected.encrypt,trust_cert,login_timeout,query_timeout,retries,schema_authorization,trace_flag,threads,driver) — matches Fabric's own scope minimalism.encrypt/trust_certget sane defaults (true/false, matching bothSqlServerDbConfig's doc comments anddbt-auth'sDEFAULT_ENCRYPT/DEFAULT_TRUST_CERT) baked intodefault_sqlserver_config(); the rest are leftNoneand fall through to their documented defaults elsewhere.adapter_config/*.rsfiles in this crate have any test coverage today (includingfabric_config.rs, the file this one is modeled on) — the only tests in the crate are ininit.rsandprofile_setup.rs. This differs from Part 8's loader macros, where real behavioral test precedent existed and was matched; here there's no precedent to deviate from.dbt-sqlserver, Python) has no equivalent interactive wizard — this is v2-only functionality, so there's no v1 source to diff against.Verification
cargo check -p dbt-init: clean.cargo clippy -p dbt-init --all-targets: clean.cargo test -p dbt-init: 7/7 passing (pre-existing; none touchadapter_config).cargo fmt -p dbt-initapplied.AdapterTypematch site in this crate needed a new arm (grep -rn "AdapterType::Fabric" crates/dbt-init/src/returns only the two sites touched here;init.rshas noAdapterTypereferences at all).Closes #9