dbt-labs/dbt-core · error

Unknown or unsupported adapter type

Error message

Unknown or unsupported adapter type

What it means

Building `DbtTest` nodes calls `AdapterType::from_str(&manifest.metadata.adapter_type).expect("Unknown or unsupported adapter type")`. The manifest metadata's `adapter_type` string must map to a known `AdapterType` enum variant; the panic means the manifest was produced by an adapter (or dbt version) this build doesn't recognize.

Source

Thrown at crates/dbt-schemas/src/schemas/manifest/manifest.rs:1306

                            metrics: test.__base_attr__.metrics,
                            unrendered_config: canonicalize_unrendered_config(
                                test.__base_attr__.unrendered_config,
                            ),
                        },
                        __test_attr__: DbtTestAttr {
                            column_name: test.column_name,
                            attached_node: test.attached_node,
                            test_metadata: test.test_metadata,
                            file_key_name: test.file_key_name,
                            introspection: IntrospectionKind::None,
                            original_name: None,
                            group: None,
                            state: test.config.state.clone(),
                        },
                        __adapter_attr__: AdapterAttr::from_config_and_dialect(
                            &test.config.__warehouse_specific_config__,
                            AdapterType::from_str(&manifest.metadata.adapter_type)
                                .expect("Unknown or unsupported adapter type"),
                        ),
                        deprecated_config: test.config,
                        __other__: test.__other__,
                    }),
                );
            }
            DbtNode::Snapshot(snapshot) => {
                let recalculated_checksum = match snapshot.__base_attr__.raw_code.clone() {
                    Some(raw_code) => {
                        // Recalculate checksum that eliminates whitespace and case differences.
                        let normalized_raw_code = normalize_sql(&raw_code);
                        let normalized_mantle_conforming_raw_code =
                            conform_normalized_snapshot_raw_code_to_mantle_format(
                                normalized_raw_code.as_str(),
                            );
                        recalculate_checksum(
                            Some(normalized_mantle_conforming_raw_code.as_str()),
                            snapshot.__base_attr__.checksum.clone(),

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Upgrade this crate/toolchain to a version whose `AdapterType` enum includes the manifest's adapter type
  2. Regenerate the manifest with a supported adapter so `metadata.adapter_type` uses a recognized name
  3. Fix typos or empty values in `metadata.adapter_type` if the manifest was hand-edited or produced by custom tooling

Example fix

// before
AdapterType::from_str(&manifest.metadata.adapter_type).expect("Unknown or unsupported adapter type")
// after
AdapterType::from_str(&manifest.metadata.adapter_type).unwrap_or(AdapterType::Postgres)
Defensive patterns

Strategy: validation

Validate before calling

// before parsing a manifest
const KNOWN: &[&str] = &["postgres", "bigquery", "snowflake", "duckdb", /* ... */];
if !KNOWN.contains(&manifest.metadata.adapter_type.as_str()) {
    return Err(format!("unsupported adapter_type: {}", manifest.metadata.adapter_type));
}

Type guard

fn adapter_type_known(manifest: &DbtManifest) -> bool {
    AdapterType::from_str(&manifest.metadata.adapter_type).is_ok()
}

Try / catch

let adapter = std::panic::catch_unwind(|| AdapterType::from_str(&manifest.metadata.adapter_type))
    .ok()
    .and_then(|r| r.ok());

Prevention

When it happens

Trigger: Parsing/consuming a manifest whose `metadata.adapter_type` is a string not in `AdapterType::from_str` — e.g. manifests generated by a newer dbt/adapter release, a third-party adapter with a novel type name, or a manifest hand-edited/corrupted so adapter_type is empty or misspelled.

Common situations: Cross-version artifact consumption (manifest.json written by newer adapter, read by older toolchain); custom/community adapters whose type string isn't registered; empty adapter_type in partially-built manifests used in tests.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/b6fea8fd72e6c245. Report an issue: GitHub.