{"record":{"id":"c83ebb3571f02b46","repo":"dbt-labs/dbt-core","slug":"get-common-options-failed-to-deserialize-config","errorCode":null,"errorMessage":"get_common_options: Failed to deserialize config: {e}","messagePattern":"get_common_options: Failed to deserialize config: (.+?)","errorType":"exception","errorClass":"minijinja::Error::SerdeDeserializeError","httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":2186,"sourceCode":"    #[tracing::instrument(skip(self, state), level = \"trace\")]\n    pub fn get_common_options(\n        &self,\n        state: &State,\n        args: &[Value],\n    ) -> Result<Value, minijinja::Error> {\n        match &self.inner {\n            Typed { adapter, .. } => {\n                let iter = ArgsIter::new(\"get_common_options\", &[\"config\", \"node\"], args);\n                let config_val = iter.next_arg::<&Value>()?;\n                let node_val = iter.next_arg::<&Value>()?;\n                let temporary = iter\n                    .next_kwarg::<Option<bool>>(\"temporary\")?\n                    .unwrap_or(false);\n                iter.finish()?;\n\n                let config = minijinja_value_to_typed_struct::<ModelConfig>(config_val.clone())\n                    .map_err(|e| {\n                        minijinja::Error::new(\n                            minijinja::ErrorKind::SerdeDeserializeError,\n                            format!(\"get_common_options: Failed to deserialize config: {e}\"),\n                        )\n                    })?;\n                let node = minijinja_value_to_typed_struct::<InternalDbtNodeWrapper>(\n                    node_val.clone(),\n                )\n                .map_err(|e| {\n                    minijinja::Error::new(\n                        minijinja::ErrorKind::SerdeDeserializeError,\n                        format!(\n                            \"get_common_options: Failed to deserialize InternalDbtNodeWrapper: {e}\"\n                        ),\n                    )\n                })?;\n\n                let options = adapter.get_common_options(state, config, &node, temporary)?;\n                Ok(options)","sourceCodeStart":2168,"sourceCodeEnd":2204,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L2168-L2204","documentation":"get_common_options() converts its `config` argument into a ModelConfig struct via serde before computing shared DDL options. When the supplied config Value cannot be deserialized into ModelConfig, this SerdeDeserializeError is raised with the serde detail appended. It signals the config object passed from Jinja does not match the ModelConfig schema.","triggerScenarios":"adapter.get_common_options(config, node, temporary=...) called with a config dict containing fields of wrong types (e.g. non-bool where bool expected, non-list tags), unknown incompatible values, or a non-object config.","commonSituations":"Custom materializations (table/view/incremental) passing raw dicts instead of config.model; config keys renamed between dbt versions; user YAML values that fail strict typed parsing (e.g. a quoted boolean string).","solutions":["Read the serde detail appended to the message to find the failing field.","Pass config.model from the materialization context instead of a hand-built dict.","Fix the offending value's type in the model config block or dbt_project.yml.","Reconcile custom macros with this adapter version's ModelConfig field names and types."],"exampleFix":"// before\n{% do adapter.get_common_options({'temporary': 'true'}, model) %}\n\n// after\n{% do adapter.get_common_options(config.model, model, temporary=true) %}","handlingStrategy":"validation","validationCode":"{% if config.model is mapping %}\n  {% set opts = adapter.get_common_options(config.model, model, temporary=Temporary) %}\n{% endif %}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass config.model from the materialization context","Validate config value types in YAML (booleans as booleans, tags as lists)","Avoid renaming config keys consumed by ModelConfig","Keep custom materializations updated against ModelConfig"],"tags":["deserialization","jinja","config"],"backgroundTag":"schema-validation-failed","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"}