{"record":{"id":"15aec9a79db81f32","repo":"dbt-labs/dbt-core","slug":"msg","errorCode":null,"errorMessage":"{msg}","messagePattern":"\\{msg\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/column/types.rs","lineNumber":302,"sourceCode":"            AdapterType::ClickHouse => \"String\".to_string(),\n            _ => match size {\n                Some(size) => format!(\"character varying({size})\"),\n                _ => \"character varying\".to_string(),\n            },\n        }\n    }\n\n    /// https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-adapters/src/dbt/adapters/base/column.py#L127-L128\n    #[expect(clippy::wrong_self_convention)]\n    fn from_description(\n        &self,\n        name: &str,\n        raw_data_type: &str,\n    ) -> Result<Column, minijinja::Error> {\n        // TODO(serramatutu): why is this Snowflake specific in non-Snowflake specific trait?\n        // It seems like it is used by other adapters as well... (tested with BigQuery)\n        let mut col = Column::try_from_snowflake_raw_data_type(name, raw_data_type)\n            .map_err(|msg| minijinja::Error::new(minijinja::ErrorKind::InvalidArgument, msg))?;\n        col._adapter_type = self.0;\n        Ok(col)\n    }\n\n    /// https://github.com/databricks/dbt-databricks/blob/822b105b15e644676d9e1f47cbfd765cd4c1541f/dbt/adapters/databricks/column.py#L66\n    fn dbx_format_add_column_list(\n        self: &Arc<Self>,\n        columns: &[Column],\n    ) -> Result<String, minijinja::Error> {\n        if self.0 != AdapterType::Databricks {\n            unimplemented!(\"Only available for Databricks\")\n        };\n\n        Ok(columns\n            .iter()\n            .map(|c| format!(\"{} {}\", c.quoted(), c.core_dtype))\n            .collect::<Vec<String>>()\n            .join(\", \"))","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/column/types.rs#L284-L320","documentation":"ColumnStatic.from_description(name, raw_data_type) parses a raw Snowflake-style data type string into a Column. When the raw_data_type string cannot be parsed by try_from_snowflake_raw_data_type, the resulting message is wrapped as a minijinja InvalidArgument error. The message text comes directly from the parser, e.g. an unrecognized or malformed type such as an empty string or an unparseable compound type.","triggerScenarios":"Calling `Column.from_description(name, raw_data_type)` with a raw_data_type that try_from_snowflake_raw_data_type rejects — e.g. empty string, a type string with unsupported syntax, or a struct/map/array type the Snowflake-style parser cannot decompose.","commonSituations":"Materializations that introspect warehouse catalogs and pass back a native type string in a dialect the parser does not handle (e.g. BigQuery GEOGRAPHY, Databricks complex types); custom SQL producing exotic types; passing None/empty because the source column metadata was missing.","solutions":["Log/inspect the wrapped message (it is the raw parser msg) to see exactly which part of the type string failed.","Normalize the raw data type to a Snowflake-style form the parser understands (e.g. VARCHAR(10), NUMBER(38,0), TIMESTAMP_NTZ) before calling from_description.","Guard the call: validate raw_data_type is non-empty and matches a known type pattern before invoking.","Fall back to Column.create(name, dtype) with a generic type when the raw type cannot be represented."],"exampleFix":"// before\n{% set col = Column.from_description(name=col_name, raw_data_type='') %}\n// after\n{% set raw = col_type if col_type else 'VARCHAR' %}\n{% set col = Column.from_description(name=col_name, raw_data_type=raw) %}","handlingStrategy":"validation","validationCode":"// Jinja: validate raw type before parsing\n{% if not raw_data_type or raw_data_type is not string %}\n  {{ exceptions.raise_compiler_error(\"from_description requires a non-empty raw_data_type string\") }}\n{% endif %}","typeGuard":"fn looks_like_snowflake_type(s: &str) -> bool {\n    !s.trim().is_empty() && s.chars().next().map(|c| c.is_ascii_alphabetic()).unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Validate raw_data_type is non-empty and alphanumeric before calling.","Normalize warehouse-native type strings to Snowflake-style syntax.","Log the raw type string alongside the error message when debugging catalog-driven materializations.","Provide a fallback generic type (e.g. VARCHAR) for unparseable types."],"tags":["jinja","adapter","column","data-type","parsing"],"backgroundTag":"invalid-argument-value","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"}