{"record":{"id":"3f56b25291434c14","repo":"dbt-labs/dbt-core","slug":"compute-external-path-failed-to-deserialize-inter","errorCode":null,"errorMessage":"compute_external_path: Failed to deserialize InternalDbtNodeWrapper: {e}","messagePattern":"compute_external_path: Failed to deserialize InternalDbtNodeWrapper: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":2830,"sourceCode":"                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(\n                    config,\n                    node.as_internal_node(),\n                    is_incremental,\n                )?;\n                Ok(Value::from(result))\n            }\n            Parse(_) => Ok(empty_string_value()),\n        }\n    }\n","sourceCodeStart":2812,"sourceCodeEnd":2848,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L2812-L2848","documentation":"Raised in `compute_external_path` when the `model` argument cannot be deserialized into an InternalDbtNodeWrapper struct. The prefixed message distinguishes node-deserialization failure from config failure in the same function. It means the value passed as the model node does not match the internal node schema.","triggerScenarios":"Calling `compute_external_path` with a model value that is not a full dbt node (e.g. a relation, a string model name, or a trimmed dict), or a node dict missing fields required by InternalDbtNodeWrapper such as unique_id, resource_type, or path components.","commonSituations":"Passing `this` (a relation) instead of the model node; passing just the model name; constructing a minimal node dict in a test macro; internal node schema changes across dbt versions breaking hand-assembled nodes.","solutions":["Pass the actual model node object (e.g. from the model context) rather than a name, relation, or partial dict","Check the wrapped serde message for the missing or mistyped node field","If constructing a node, include all fields InternalDbtNodeWrapper requires","Upgrade/align custom code with the node schema of the installed dbt version"],"exampleFix":"// before (Jinja)\n{{ compute_external_path(config, model_name, ...) }}\n// after\n{{ compute_external_path(config, model, ...) }}","handlingStrategy":"type-guard","validationCode":"{% if model is not mapping or 'unique_id' not in model %}\n  {{ exceptions.raise_compiler_error(\"compute_external_path requires a full model node\") }}\n{% endif %}","typeGuard":"{% macro is_model_node(v) %}\n  {{ return(v is mapping and 'unique_id' in v and 'resource_type' in v) }}\n{% endmacro %}","tryCatchPattern":"{% if model is not mapping or 'unique_id' not in model %}\n  {% set model = model.config.model if model is mapping else none %}\n{% endif %}","preventionTips":["Pass the actual model node object, never a name or relation","Do not trim node dicts before passing to adapter functions","Re-validate node construction after dbt upgrades"],"tags":["jinja","adapter","deserialization","node"],"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"}