dbt-labs/dbt-core · error
Unknown method on Column
Error message
Unknown method on Column: '{name}' What it means
Column implements minijinja's call_method with a fixed whitelist of method names (is_string, string_size, is_number, is_float, is_integer, is_numeric, can_expand_to, flatten, render_for_create, etc.). Calling any other method on a Column object from a template raises UnknownMethod with the message "Unknown method on Column: '<name>'".
Solutions
- Check the exact method name against the whitelist in Column::call_method and fix the typo/name in the template.
- Replace unported Python Column methods with supported equivalents (e.g. is_string/is_numeric) or inline the logic in the macro.
- If the method is genuinely needed, implement it in Column::call_method in crates/dbt-adapter/src/column/types.rs.
- Wrap dynamic method calls in Jinja with a check or default: use attribute inspection / try blocks where supported.
Example fix
// before
{% set dt = col.datatype() %}
// after
{% set dt = col.dtype() %} {# or a whitelisted method such as col.is_string() #} Defensive patterns
Strategy: validation
Validate before calling
{% set supported = ['is_string','string_size','is_number','is_float','is_integer','is_numeric','can_expand_to','flatten','render_for_create'] %}
{% if not (method_name in supported) %}
{{ exceptions.raise_compiler_error('Column method not supported: ' ~ method_name) }}
{% endif %} Try / catch
// call-site guard
match column.call(name, args, &[]) {
Ok(v) => v,
Err(e) if e.kind() == minijinja::ErrorKind::UnknownMethod => fallback_value(),
Err(e) => return Err(e),
} Prevention
- Audit macros migrated from Python dbt for Column methods not ported to the Rust adapter
- Keep a reference list of supported Column methods during migration
- Prefer whitelisted predicates (is_string, is_numeric, etc.) over Python-only helpers
When it happens
Trigger: A Jinja template calls a method that does not exist on Column (typo like col.strings_size(), col.is_string_type(), or a Python dbt Column method that has not been ported to this Rust adapter).
Common situations: Migrating macros from Python dbt-core/adapters to the Rust engine: the Python Column class has more methods (e.g. is_string_with_limit, datatype, etc.) that are not implemented here, so established macros break with UnknownMethod.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- adapter not found in context
- adapter should be configured for the parse phase
- agate_table must be an agate.Table
- Argument must be a string
- argument 'name' to has_var() has incompatible type; value…
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/fd8f327ef8364e27.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-adapter/src/column/types.rs:1189
})?)),
"is_number" => Ok(Value::from(self.is_number())),
"is_float" => Ok(Value::from(self.is_float())),
"is_integer" => Ok(Value::from(self.is_integer())),
"is_numeric" => Ok(Value::from(self.is_numeric())),
"can_expand_to" => {
// TODO(serramatutu): use ArgsIter
let mut parser = ArgParser::new(args, None);
check_num_args(current_function_name!(), &parser, 1, 1)?;
let other_raw = parser.get::<Value>("other_column")?;
let other = Column::from_jinja_value(self._adapter_type, other_raw)?;
Ok(Value::from(self.can_expand_to(&other)?))
}
// Bigquery only
"flatten" => Ok(Value::from(self.flatten())),
// Databricks/Spark only - render column DDL for CREATE TABLE
"render_for_create" => Ok(Value::from(self.render_for_create())),
_ => Err(minijinja::Error::new(
minijinja::ErrorKind::UnknownMethod,
format!("Unknown method on Column: '{name}'"),
)),
}
}
fn get_value(self: &Arc<Self>, key: &Value) -> Option<Value> {
match key.as_str() {
// @property methods
Some("name") | Some("column") => Some(Value::from(&self.name)),
Some("quoted") => Some(Value::from(self.quoted())),
Some("data_type") => Some(Value::from(self.data_type())),
// direct fields
Some("dtype") => Some(Value::from(&self.core_dtype)),
Some("char_size") => Some(Value::from(self.char_size)),
Some("numeric_precision") => Some(Value::from(self.numeric_precision)),
Some("numeric_scale") => Some(Value::from(self.numeric_scale)),
Some("collation") => Some(Value::from(self.collation.as_deref())),View on GitHub (pinned to 0267ce9170)