{"record":{"id":"fa66722433f26895","repo":"dbt-labs/dbt-core","slug":"dbtquoting-resolvedquoting-conversion-fa6672","errorCode":null,"errorMessage":"DbtQuoting -> ResolvedQuoting conversion","messagePattern":"DbtQuoting -> ResolvedQuoting conversion","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-parser/src/resolve/resolve_snapshots.rs","lineNumber":558,"sourceCode":"                    database: \"\".to_owned(), // will be updated below\n                    schema: \"\".to_owned(),   // will be updated below\n                    alias: \"\".to_owned(),    // will be updated below\n                    relation_name: None,     // will be updated below\n                    columns,\n                    depends_on: NodeDependsOn {\n                        macros: macro_depends_on,\n                        nodes: vec![],\n                        nodes_with_ref_location: vec![],\n                    },\n                    compute: snapshot_config.compute,\n                    enabled: snapshot_config.enabled,\n                    extended_model: false,\n                    persist_docs: snapshot_config.persist_docs.clone(),\n                    materialized: snapshot_config.materialized.clone(),\n                    quoting: snapshot_config\n                        .quoting\n                        .try_into()\n                        .expect(\"DbtQuoting -> ResolvedQuoting conversion\"),\n                    quoting_ignore_case: snapshot_config\n                        .quoting\n                        .snowflake_ignore_case\n                        .unwrap_or(false),\n                    static_analysis_off_reason: (*static_analysis == StaticAnalysisKind::Off)\n                        .then_some(StaticAnalysisOffReason::ConfiguredOff),\n                    static_analysis,\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                    unrendered_config,","sourceCodeStart":540,"sourceCodeEnd":576,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-parser/src/resolve/resolve_snapshots.rs#L540-L576","documentation":"A panic from an unchecked `TryInto` conversion when building the node base attributes for a snapshot: the snapshot's `DbtQuoting` config (as parsed from YAML) is converted into the resolved `ResolvedQuoting` representation expected downstream. The `expect` fires when the quoting config cannot be represented in resolved form — i.e. the quoting settings parsed from the project/snapshot config are invalid or out of the accepted domain.","triggerScenarios":"Declaring a `quoting:` block under a snapshot (or snapshot defaults in `dbt_project.yml`) whose fields cannot convert to `ResolvedQuoting` — for example quoting values that are not the accepted boolean/enum forms, or a quoting config shape produced by programmatic/serialized input that the resolved type rejects.","commonSituations":"Typo'd or wrong-typed values in a `quoting:` config (e.g. strings instead of booleans, unexpected keys); a snapshot config assembled by tooling or copied from another dbt version with a different quoting schema; dependencies pinned to a dbt version whose quoting schema differs.","solutions":["Inspect the snapshot's `quoting:` config (and project-level snapshot defaults) and use only accepted keys/values (database/schema/identifier as booleans, snowflake_ignore_case as boolean)","Delete stale `target/`/partial parse artifacts and re-parse so configs are re-read from source YAML","Move the quoting config to `dbt_project.yml` `snapshots:` defaults to test whether the snapshot-level block is the problem","If the value comes from generated config, fix the generator to emit the `DbtQuoting` schema this parser expects"],"exampleFix":"# before\nsnapshots:\n  my_snapshot:\n    +quoting:\n      identifier: \"true\"   # string, not bool\n\n# after\nsnapshots:\n  my_snapshot:\n    +quoting:\n      identifier: true","handlingStrategy":"validation","validationCode":"# pre-parse sanity check of a snapshot's quoting config\nquoting = snapshot_cfg.get(\"quoting\", {})\nfor key in (\"database\", \"schema\", \"identifier\"):\n    if key in quoting and not isinstance(quoting[key], bool):\n        raise ValueError(f\"quoting.{key} must be a boolean, got {quoting[key]!r}\")\nif \"snowflake_ignore_case\" in quoting and not isinstance(quoting[\"snowflake_ignore_case\"], bool):\n    raise ValueError(\"quoting.snowflake_ignore_case must be a boolean\")","typeGuard":null,"tryCatchPattern":"// if invoking the resolver programmatically\nlet result = std::panic::catch_unwind(|| resolve_snapshots(...));\nmatch result {\n    Ok(res) => res?,\n    Err(_) => anyhow::bail!(\"snapshot quoting config failed to convert; check 'quoting:' keys/values in dbt_project.yml and snapshot files\"),\n}","preventionTips":["Use only documented quoting keys (database/schema/identifier/snowflake_ignore_case) with boolean values","Copy quoting blocks only from projects targeting the same dbt version","Avoid generating snapshot configs with untyped/stringly values from scripts","Remove stale `target/` artifacts when switching dbt versions so configs are revalidated"],"tags":["rust","config","quoting","snapshot","type-conversion"],"backgroundTag":"config-type-mismatch","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}