dbt-labs/dbt-core · error

get_relations_without_caching

Error message

get_relations_without_caching

What it means

get_relations_without_caching is a stub: the entire method body is unimplemented!("get_relations_without_caching"), so every call panics regardless of adapter type. It mirrors DatabricksAdapter.impl.py#L463 but was never implemented in this Rust adapter; unlike the adapter-guarded methods there is no working branch at all.

Source

Thrown at crates/dbt-adapter/src/adapter/adapter_impl.rs:4743

                let model_col = model_columns_lower.get(&col.name().to_lowercase()).copied();
                let not_null = not_nulls_lower.contains(&col.name().to_lowercase());
                col.enrich_for_create(model_col, not_null)
            })
            .collect();

        Ok(Value::from(vec![
            Value::from_iter(enriched_columns.into_iter().map(Value::from_object)),
            Value::from_iter(typed_constraints.into_iter().map(Value::from_object)),
        ]))
    }

    /// DatabricksAdapter https://github.com/databricks/dbt-databricks/blob/2f11abb306a400cde32b27891b766bf41a11fb1f/dbt/adapters/databricks/impl.py#L463
    pub fn get_relations_without_caching(
        &self,
        _state: &State,
        _relation: &Arc<dyn BaseRelation>,
    ) -> Result<Value, minijinja::Error> {
        unimplemented!("get_relations_without_caching")
    }

    /// PostgresAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-postgres/src/dbt/adapters/postgres/impl.py#L128
    pub fn parse_index(
        &self,
        _state: &State,
        _raw_index: &Value,
    ) -> Result<Value, minijinja::Error> {
        unimplemented!("parse_index")
    }

    /// DatabricksAdapter https://github.com/databricks/dbt-databricks/blob/2f11abb306a400cde32b27891b766bf41a11fb1f/dbt/adapters/databricks/impl.py#L990
    pub fn get_column_tags_from_model(
        &self,
        model: &dyn InternalDbtNodeAttributes,
    ) -> AdapterResult<Value> {
        use crate::relation::databricks::config::components::ColumnTagsLoader;

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Use list_relations (via the relation cache) instead of get_relations_without_caching
  2. Guard the macro so this method is never invoked, or replace it with adapter.get_relation/list_relations equivalents
  3. If you truly need it, implement the stub in crates/dbt-adapter to return the uncached relation list for your adapter

Example fix

// before
let relations = adapter.get_relations_without_caching(state, relation)?;

// after
let relations = adapter.list_relations(query_ctx, conn, db_schema, token)?;
Defensive patterns

Strategy: fallback

Try / catch

// The stub panics unconditionally; never call it — use the cached path instead:
let relations = adapter.list_relations(query_ctx, conn, db_schema, token)?;

Prevention

When it happens

Trigger: Any invocation of adapter.get_relations_without_caching(state, relation) — from a Jinja macro, a materialization that fetches relations bypassing the cache, or Rust code — always panics because the stub is unconditional.

Common situations: A dbt-databricks macro or materialization that relies on uncached relation lookup is executed; porting Python dbt macros that call get_relations_without_caching directly; no version of this adapter currently supports the call.

Related errors


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