{"record":{"id":"c177f904260a3110","repo":"dbt-labs/dbt-core","slug":"error-c177f9","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/mod.rs","lineNumber":2443,"sourceCode":"                Ok(result)\n            }\n            Parse(_) => Ok(none_value()),\n        }\n    }\n\n    #[tracing::instrument(skip(self, state), level = \"trace\")]\n    pub fn update_columns(&self, state: &State, args: &[Value]) -> Result<Value, minijinja::Error> {\n        match &self.inner {\n            Typed { adapter, .. } => {\n                let iter = ArgsIter::new(\"update_columns\", &[\"relation\", \"columns\"], args);\n                let relation_val = iter.next_arg::<&Value>()?;\n                let relation = downcast_value_to_dyn_base_relation(relation_val)?;\n                let columns_val = iter.next_arg::<&Value>()?;\n                let columns = minijinja_value_to_typed_struct::<IndexMap<String, DbtColumn>>(\n                    columns_val.clone(),\n                )\n                .map_err(|e| {\n                    minijinja::Error::new(\n                        minijinja::ErrorKind::SerdeDeserializeError,\n                        e.to_string(),\n                    )\n                })?;\n                iter.finish()?;\n\n                let mut conn =\n                    adapter.borrow_tlocal_connection(Some(state), node_id_from_state(state))?;\n                let result = adapter.update_columns_descriptions(\n                    state,\n                    conn.as_mut(),\n                    &relation,\n                    columns,\n                    self.cancellation_token.clone(),\n                )?;\n                Ok(result)\n            }\n            Parse(_) => Ok(none_value()),","sourceCodeStart":2425,"sourceCodeEnd":2461,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/mod.rs#L2425-L2461","documentation":"This error wraps a serde deserialization failure (kind SerdeDeserializeError) that occurred while converting the Jinja `columns` argument of `update_columns` into an IndexMap<String, DbtColumn>. The library throws it because the columns value passed from Jinja does not match the expected structure: a mapping of column name -> column definition with DbtColumn's required fields.","triggerScenarios":"Calling `update_columns(relation, columns)` where `columns` is not a plain name->column map: missing required DbtColumn fields, wrong field types (e.g. string where a list is expected), passing a list of columns instead of a dict, or passing nested/extra values that fail strict deserialization.","commonSituations":"Building the columns dict by hand in Jinja and missing a required column attribute like name or data_type; passing columns from a schema.yml parse result in the wrong shape; version drift where DbtColumn gained or renamed a required field.","solutions":["Ensure columns is a dict keyed by column name, each value a valid column definition (e.g. {\"id\": {\"name\": \"id\", \"data_type\": \"int\"}})","Add all fields required by DbtColumn to each entry","Use adapter.get_columns_in_relation() output rather than hand-built dicts when possible","Read the wrapped serde message (rendered in place of {}) to identify the exact missing/mistyped field"],"exampleFix":"// before (Jinja)\n{{ update_columns(relation, ['id', 'name']) }}\n// after\n{% set cols = {'id': {'name': 'id', 'data_type': 'int'}} %}\n{{ update_columns(relation, cols) }}","handlingStrategy":"validation","validationCode":"{% if columns is not mapping %}\n  {{ exceptions.raise_compiler_error(\"update_columns requires a dict of column definitions\") }}\n{% endif %}","typeGuard":null,"tryCatchPattern":"{% set cols = columns if columns is mapping else {} %}\n{{ update_columns(relation, cols) }}","preventionTips":["Use adapter.get_columns_in_relation() to source column dicts instead of hand-building them","Keep each column dict complete with all DbtColumn-required fields","Log the columns value with log() to verify shape before calling"],"tags":["jinja","adapter","deserialization","schema"],"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"}