{"record":{"id":"d6992c9bcb1cbdcc","repo":"dbt-labs/dbt-core","slug":"compute-external-path-failed-to-deserialize-confi","errorCode":null,"errorMessage":"compute_external_path: Failed to deserialize config: {e}","messagePattern":"compute_external_path: Failed to deserialize config: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":2820,"sourceCode":"    #[tracing::instrument(skip_all, level = \"trace\")]\n    pub fn compute_external_path(\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(\"compute_external_path\", &[\"config\", \"model\"], args);\n                let config_val = iter.next_arg::<&Value>()?;\n                let model_val = iter.next_arg::<&Value>()?;\n                let is_incremental = iter\n                    .next_kwarg::<Option<bool>>(\"is_incremental\")?\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!(\"compute_external_path: Failed to deserialize config: {e}\"),\n                        )\n                    })?;\n\n                let node = minijinja_value_to_typed_struct::<InternalDbtNodeWrapper>(\n                    model_val.clone(),\n                )\n                .map_err(|e| {\n                    minijinja::Error::new(\n                        minijinja::ErrorKind::SerdeDeserializeError,\n                        format!(\n                            \"compute_external_path: Failed to deserialize InternalDbtNodeWrapper: {e}\"\n                        ),\n                    )\n                })?;\n\n                let result = adapter.compute_external_path(","sourceCodeStart":2802,"sourceCodeEnd":2838,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L2802-L2838","documentation":"Raised in `compute_external_path` when the `config` argument cannot be deserialized into a ModelConfig struct. The library wraps the underlying serde error with this prefixed message so the failing step (config deserialization) is identifiable. It indicates the config object passed from Jinja does not conform to ModelConfig's expected schema.","triggerScenarios":"Calling `compute_external_path(..., config, model, ...)` with a config Value that lacks required ModelConfig fields, has wrong-typed fields (e.g. non-bool enabled, non-string materialization), or is not a config object at all (e.g. a plain dict from unrelated context).","commonSituations":"Constructing a fake config dict in a macro instead of using the model's real `config`; partial config objects in custom materializations; ModelConfig schema changed between dbt versions so previously valid configs now miss required fields.","solutions":["Pass the model's actual config object (model.config) rather than a hand-built dict","Check the embedded serde message for the exact missing/mistyped field and fix it","Supply all required ModelConfig fields with correctly typed values","Align custom-materialization code with the ModelConfig schema of your dbt version"],"exampleFix":"// before (Jinja)\n{{ compute_external_path(config={'external_root': '/tmp'}, model, ...) }}\n// after\n{{ compute_external_path(config=model.config, model=model, ...) }}","handlingStrategy":"try-catch","validationCode":"{% if config is not mapping or 'external_root' not in config %}\n  {{ exceptions.raise_compiler_error(\"compute_external_path requires a valid ModelConfig\") }}\n{% endif %}","typeGuard":null,"tryCatchPattern":"{% set c = config if config is defined else model.config %}\n{{ compute_external_path(c, model, ...) }}","preventionTips":["Always pass model.config, never a hand-built dict","Keep custom materializations updated with ModelConfig schema changes","Include all required fields with correct types when synthesizing configs"],"tags":["jinja","adapter","deserialization","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"}