dbt-labs/dbt-core · error · minijinja::Error

describe_dynamic_table is not supported by the {} adapter

Error message

describe_dynamic_table is not supported by the {} adapter

What it means

describe_dynamic_table is only implemented for a subset of adapter types. For adapters like Snowflake-alternatives in the excluded list (LakeCompute, Fabric, ClickHouse, Exasol, Starburst, Athena, Trino, Datafusion, Dremio, Oracle, etc.) the method deliberately raises an InvalidOperation error naming the adapter. It signals an unsupported operation, not a data problem.

Source

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

                    })?;
                    AgateTable::from_record_batch(Arc::new(new_batch))
                } else {
                    table
                };

                Ok(Value::from(ValueMap::from([(
                    Value::from("dynamic_table"),
                    Value::from_object(table),
                )])))
            }
            Postgres | Bigquery | Databricks | Redshift | Salesforce | Spark | DuckDB
            | LakeCompute | Fabric | ClickHouse | Exasol | Starburst | Athena | Trino
            | Datafusion | Dremio | Oracle => {
                let err = format!(
                    "describe_dynamic_table is not supported by the {} adapter",
                    adapter_type
                );
                Err(minijinja::Error::new(
                    minijinja::ErrorKind::InvalidOperation,
                    err,
                ))
            }
        }
    }

    /// `SHOW INTERACTIVE TABLES` has no transient status, so unlike `describe_dynamic_table`
    /// this never runs a second `SHOW TABLES` to fold `transient` in.
    ///
    /// SnowflakeAdapter https://github.com/dbt-labs/dbt-adapters/blob/2d27c26df1a4b71144cd4585cfdefac39cd311bc/dbt-snowflake/src/dbt/adapters/snowflake/impl.py#L739-L775
    pub fn describe_interactive_table(
        &self,
        state: &State,
        conn: &'_ mut dyn Connection,
        relation: &Arc<dyn BaseRelation>,
        token: CancellationToken,
    ) -> Result<Value, minijinja::Error> {

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Guard the call: only invoke describe_dynamic_table when adapter_type supports it (e.g. Snowflake).
  2. Provide a fallback in the macro for unsupported adapters, or make the dynamic-table feature Snowflake-only.
  3. Wrap the call in a try/catch and degrade gracefully if the model must run on multiple warehouses.
  4. If support is needed, implement describe_dynamic_table for that adapter.

Example fix

-- before
{% set info = describe_dynamic_table(relation) %}

// after
{% if adapter_type() == 'snowflake' %}
  {% set info = describe_dynamic_table(relation) %}
{% else %}
  {% set info = none %}
{% endif %}
Defensive patterns

Strategy: fallback

Validate before calling

{% set SUPPORTED = ['snowflake'] %}
{% set ok = adapter_type() in SUPPORTED %}

Type guard

fn supports_dynamic_tables(adapter_type: &str) -> bool {
    matches!(adapter_type, "snowflake")
}

Try / catch

{% try %}
  {% set info = describe_dynamic_table(relation) %}
{% except %}
  {% set info = none %}
{% endtry %}

Prevention

When it happens

Trigger: Calling describe_relation (which dispatches to describe_dynamic_table) against a relation of type dynamic table while connected with one of the unsupported adapter types.

Common situations: Porting dbt projects that use Snowflake dynamic tables onto ClickHouse/Trino/Athena etc.; generic macros that call describe_dynamic_table without checking adapter type; running the same model suite across warehouses.

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


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