dbt-labs/dbt-core · error

DbtQuoting -> ResolvedQuoting conversion

Error message

DbtQuoting -> ResolvedQuoting conversion

What it means

Panic "DbtQuoting -> ResolvedQuoting conversion" occurs in NodeBaseAttributes for seeds when `properties_config.quoting.try_into::<ResolvedQuoting>()` returns Err. Like the model case, this conversion should be total; failure signals an unexpected field/value combination in the seed's quoting config.

Source

Thrown at crates/dbt-parser/src/resolve/resolve_seeds.rs:395

                    .clone()
                    .map(Into::into)
                    .unwrap_or_default(),
                classifiers: Default::default(),
                meta: properties_config.meta.clone().unwrap_or_default(),
            },
            __base_attr__: NodeBaseAttributes {
                adapter: selected_adapter,
                propagate: selected_propagate,
                database: database.to_string(), // will be updated below
                schema: schema.to_string(),     // will be updated below
                alias: "".to_owned(),           // will be updated below
                relation_name: None,            // will be updated below
                columns,
                depends_on: NodeDependsOn::default(),
                quoting: properties_config
                    .quoting
                    .try_into()
                    .expect("DbtQuoting -> ResolvedQuoting conversion"),
                materialized: DbtMaterialization::Table,
                static_analysis_off_reason: (*static_analysis == StaticAnalysisKind::Off)
                    .then_some(StaticAnalysisOffReason::ConfiguredOff),
                static_analysis,
                unrendered_config,
                persist_docs: properties_config.persist_docs.clone(),
                ..Default::default()
            },
            __seed_attr__: DbtSeedAttr {
                quote_columns: properties_config.quote_columns.unwrap_or(false),
                column_types: properties_config.column_types.clone(),
                delimiter: properties_config.delimiter.clone().map(|d| d.into_inner()),
                root_path: Some(seed_file.base_path.clone()),
                catalog_name: properties_config.catalog_name.clone(),
            },
            __other__: BTreeMap::new(),
            deprecated_config: properties_config.clone().into(),
        };

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Update the TryFrom<DbtQuoting> for ResolvedQuoting impl to cover the failing field/variant.
  2. Normalize or drop unsupported quoting keys for seeds before conversion.
  3. Propagate the error with seed name context instead of expect.

Example fix

// before
quoting: properties_config.quoting.try_into().expect("DbtQuoting -> ResolvedQuoting conversion"),
// after
quoting: properties_config.quoting.clone().try_into().unwrap_or_default(),
Defensive patterns

Strategy: fallback

Validate before calling

let rq: Result<ResolvedQuoting, _> = properties_config.quoting.clone().try_into();
if rq.is_err() { eprintln!("seed quoting not convertible: {:?}", properties_config.quoting); }

Type guard

fn convertible_seed_quoting(q: &DbtQuoting) -> bool { ResolvedQuoting::try_from(q.clone()).is_ok() }

Try / catch

let quoting: ResolvedQuoting = properties_config.quoting.clone().try_into().unwrap_or_default();

Prevention

When it happens

Trigger: Building NodeBaseAttributes for a seed whose properties_config.quoting carries a value the TryFrom impl cannot map (e.g., a newly added DbtQuoting field or an incompatible enum variant).

Common situations: Seed YAML with quoting keys that the parser's ResolvedQuoting type doesn't support; version drift where DbtQuoting gained fields before the conversion was updated.

Understand the failure class

Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.

Related errors


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