{"record":{"id":"8f34ef1071ca25db","repo":"dbt-labs/dbt-core","slug":"dbtquoting-quotingconfig-conversion","errorCode":null,"errorMessage":"DbtQuoting -> QuotingConfig conversion","messagePattern":"DbtQuoting -> QuotingConfig conversion","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_models.rs","lineNumber":879,"sourceCode":"                            .filter_map(|c| c.to.as_ref())\n                            .filter_map(|spanned| {\n                                parse_source_from_constraint(spanned).map(|(src, tbl)| {\n                                    DbtSourceWrapper {\n                                        source: vec![src, tbl],\n                                        location: Some(CodeLocationWithFile::from(\n                                            spanned.span().clone(),\n                                        )),\n                                    }\n                                })\n                            }),\n                    )\n                    .collect(),\n                metrics,\n                materialized,\n                quoting: model_config\n                    .quoting\n                    .try_into()\n                    .expect(\"DbtQuoting -> QuotingConfig conversion\"),\n                quoting_ignore_case: model_config.quoting.snowflake_ignore_case.unwrap_or(false),\n                static_analysis_off_reason: (*static_analysis == StaticAnalysisKind::Off)\n                    .then_some(StaticAnalysisOffReason::ConfiguredOff),\n                static_analysis,\n                unrendered_config,\n            },\n            __model_attr__: DbtModelAttr {\n                introspection: if sql_file_info.this {\n                    IntrospectionKind::This\n                } else {\n                    IntrospectionKind::None\n                },\n                version: maybe_version.map(|v| v.into()),\n                latest_version: maybe_latest_version.map(|v| v.into()),\n                constraints: model_constraints,\n                deprecation_date,\n                primary_key: vec![], // applied in resolver.rs -> primary_key_inference.rs\n                time_spine,","sourceCodeStart":861,"sourceCodeEnd":897,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_models.rs#L861-L897","documentation":"Panic \"DbtQuoting -> QuotingConfig conversion\" occurs in NodeBaseAttributes for models when `model_config.quoting.try_into::<QuotingConfig>()` fails. TryFrom<DbtQuoting> for QuotingConfig only fails when the quoting struct contains values that cannot be represented, making this an internal conversion invariant.","triggerScenarios":"Building NodeBaseAttributes from a model whose config.quoting holds an unsupported/incompatible quoting field value — typically after adding a new field to DbtQuoting without updating the TryFrom impl.","commonSituations":"Config rendered from YAML with unusual quoting keys (e.g., database quoting set unexpectedly) or a dbt-core version bump adding quoting fields the parser's conversion doesn't handle.","solutions":["Inspect the TryFrom<DbtQuoting> for QuotingConfig impl and handle the newly added/unset field that causes the Err.","Unset or normalize the offending quoting key in the model's config before conversion.","Replace expect with error propagation that reports the model name and quoting value."],"exampleFix":"// before\nquoting: model_config.quoting.try_into().expect(\"DbtQuoting -> QuotingConfig conversion\"),\n// after\nquoting: model_config.quoting.clone().try_into().unwrap_or_default(),","handlingStrategy":"validation","validationCode":"// verify quoting config round-trips before building nodes\nlet qc: Result<QuotingConfig, _> = model_config.quoting.clone().try_into();\nif qc.is_err() { eprintln!(\"unconvertible quoting: {:?}\", model_config.quoting); }","typeGuard":"fn convertible_quoting(q: &DbtQuoting) -> bool { QuotingConfig::try_from(q.clone()).is_ok() }","tryCatchPattern":"let quoting: QuotingConfig = model_config.quoting.clone().try_into().unwrap_or_default();","preventionTips":["Update TryFrom impls whenever DbtQuoting gains a field","Add a round-trip serde test for DbtQuoting -> QuotingConfig","Keep quoting configs limited to documented keys"],"tags":["rust","config","conversion","panic"],"backgroundTag":"type-mismatch","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}