{"record":{"id":"160ca3a76bb2a4d7","repo":"dbt-labs/dbt-core","slug":"dbtquoting-should-be-set","errorCode":null,"errorMessage":"DbtQuoting should be set","messagePattern":"DbtQuoting should be set","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_functions.rs","lineNumber":412,"sourceCode":"                meta: model_config.meta.clone().unwrap_or_default(),\n            },\n            __base_attr__: NodeBaseAttributes {\n                adapter: selected_adapter,\n                // A function is not a relation, so there is nothing to bind into another\n                // platform's catalog: no `+propagate` config exists for this node type.\n                propagate: Vec::new(),\n                database: database.to_string(), // will be updated below\n                schema: schema.to_string(),     // will be updated below\n                alias: \"\".to_owned(),           // will be updated below\n                relation_name: None,            // will be updated below\n                materialized: DbtMaterialization::Function,\n                static_analysis,\n                static_analysis_off_reason: None,\n                compute: None,\n                quoting: model_config\n                    .quoting\n                    .try_into()\n                    .expect(\"DbtQuoting should be set\"),\n                quoting_ignore_case: false,\n                enabled: model_config.enabled,\n                extended_model: false,\n                persist_docs: None,\n                columns: vec![],\n                depends_on,\n                refs: sql_file_info\n                    .refs\n                    .iter()\n                    .map(|(model, project, version, location)| DbtRef {\n                        name: model.to_owned(),\n                        package: project.to_owned(),\n                        version: version.clone(),\n                        location: Some(location.with_file(&dbt_asset.path)),\n                    })\n                    .collect(),\n                functions: sql_file_info\n                    .functions","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_functions.rs#L394-L430","documentation":"A panic from `.expect()` in `NodeBaseAttributes` construction while building model/seed/snapshot nodes: `model_config.quoting.try_into()` must convert the config's quoting value into `DbtQuoting`, and the code asserts the conversion always succeeds. The expect fires when the quoting map in the model config contains values that cannot be represented as `DbtQuoting`.","triggerScenarios":"A model (or project-level model config) defines a `quoting:` block with keys or value types that fail `TryInto<DbtQuoting>` during node resolution (`resolve_functions.rs`), e.g. an unexpected key or a non-boolean value.","commonSituations":"Typo'd or misspelled quoting keys in `quoting:` config (e.g. under models: in dbt_project.yml or a model's config block); copying quoting config from documentation for a different dbt version; YAML quoting values given as strings instead of booleans.","solutions":["Fix the `quoting:` block so it only contains valid keys (database/schema/identifier etc.) with boolean values","Check for quoting config inherited from dbt_project.yml that merges into the model config","Align quoting keys with the dbt version this crate tracks (renamed keys break the conversion)","Replace the expect with a proper error to surface the offending key instead of panicking"],"exampleFix":"# before\nmodels:\n  my_model:\n    +quoting:\n      databse: true   # typo, not a valid DbtQuoting key\n\n# after\nmodels:\n  my_model:\n    +quoting:\n      database: true\n      schema: true\n      identifier: false","handlingStrategy":"validation","validationCode":"fn validate_quoting(quoting: &IndexMap<String, BoolOrAttemptedVal>) -> Result<(), String> {\n    const VALID: &[&str] = &[\"database\", \"schema\", \"identifier\"];\n    for k in quoting.keys() {\n        if !VALID.contains(&k.as_str()) {\n            return Err(format!(\"invalid quoting key `{k}`, expected one of {VALID:?}\"));\n        }\n    }\n    Ok(())\n}","typeGuard":"fn is_valid_quoting_key(k: &str) -> bool {\n    matches!(k, \"database\" | \"schema\" | \"identifier\")\n}","tryCatchPattern":null,"preventionTips":["Only use documented quoting keys with boolean values in config","Validate dbt_project.yml model configs in CI before parsing","Check merged project-level quoting configs when a model panics"],"tags":["rust","config","quoting","conversion","panic"],"backgroundTag":"invalid-config-value","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"}