dbt-labs/dbt-core · error

Unknown method on CatalogRelation

Error message

Unknown method on CatalogRelation: '{name}'

What it means

Catch-all arm of the Jinja method dispatch on CatalogRelation: the template invoked a method name that has no implementation on this object (only supports_create_or_replace and the value protocol are handled), producing an UnknownMethod-style minijinja error.

Solutions

  1. Fix the method name in the macro/template
  2. Add the expected method to the call_method match if it should exist
  3. Include available method names in the error message to aid debugging
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at crates/dbt-adapter/src/catalog_relation.rs:1723 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/82b23755b5dbde5f. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-adapter/src/catalog_relation.rs:1723

        _state: &minijinja::State<'_, '_>,
        name: &str,
        _args: &[Value],
        _listeners: &[std::rc::Rc<dyn minijinja::listener::RenderingEventListener>],
    ) -> Result<Value, minijinja::Error> {
        match name {
            "supports_create_or_replace" => {
                if load_catalogs::fetch_use_catalogs_v2() {
                    Ok(self.gate_by_adapter(vec![AdapterType::Databricks], || {
                        Value::from(self.supports_create_or_replace())
                    }))
                } else {
                    Err(minijinja::Error::new(
                        minijinja::ErrorKind::InvalidOperation,
                        "catalog_relation.supports_create_or_replace() is only available under catalogs v2",
                    ))
                }
            }
            _ => Err(minijinja::Error::new(
                minijinja::ErrorKind::UnknownMethod,
                format!("Unknown method on CatalogRelation: '{name}'"),
            )),
        }
    }

    fn render(self: &Arc<Self>, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(
            f,
            "CatalogRelation(catalog={}, integration={}, type={}, format={})",
            self.catalog_name.as_deref().unwrap_or("<none>"),
            self.integration_name.as_deref().unwrap_or("<none>"),
            self.catalog_type.as_str(),
            self.table_format.as_str()
        )
    }
}

View on GitHub (pinned to 0267ce9170)