dbt-labs/dbt-core · error

Dremio

Error message

Dremio

What it means

This is a Rust `todo!()` panic: `get_relation` in dbt-adapter has no Dremio implementation, so resolving any relation with a Dremio adapter reaches `todo!("Dremio")` and panics. The arm exists because the AdapterType enum includes Dremio, but its metadata lookup code is unwritten.

Source

Thrown at crates/dbt-adapter/src/metadata/get_relation.rs:86

        AdapterType::Spark => {
            spark_get_relation(adapter, state, ctx, conn, schema, identifier, token)
        }
        AdapterType::DuckDB | AdapterType::LakeCompute => duckdb_get_relation(
            adapter, state, ctx, conn, database, schema, identifier, token,
        ),
        AdapterType::Fabric => fabric_get_relation(
            adapter, state, ctx, conn, database, schema, identifier, token,
        ),
        AdapterType::ClickHouse => clickhouse_get_relation(
            adapter, state, ctx, conn, database, schema, identifier, token,
        ),
        AdapterType::Exasol => exasol_get_relation(
            adapter, state, ctx, conn, database, schema, identifier, token,
        ),
        AdapterType::Starburst => todo!("Starburst"),
        AdapterType::Athena => todo!("Athena"),
        AdapterType::Trino => todo!("Trino"),
        AdapterType::Dremio => todo!("Dremio"),
        AdapterType::Oracle => todo!("Oracle"),
        AdapterType::Datafusion => todo!("Datafusion"),
    }
}

/// Parses an `INFORMATION_SCHEMA.ROUTINES`-shaped result batch into a
/// [`Relation`].
pub(crate) fn relation_from_routines_batch(
    adapter: &AdapterImpl,
    database: &str,
    schema: &str,
    identifier: &str,
    batch: &arrow::record_batch::RecordBatch,
) -> AdapterResult<Option<Relation>> {
    if batch.num_rows() == 0 {
        return Ok(None);
    }

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Use a supported adapter type until Dremio get_relation is implemented
  2. Implement dremio_get_relation (e.g. via Dremio's INFORMATION_SCHEMA or REST catalog API) and replace the todo arm
  3. Pin to a dbt-adapter release where Dremio metadata lookup is available
  4. Gate adapter selection with a capability check so unimplemented adapters fail at setup

Example fix

// before
AdapterType::Dremio => todo!("Dremio"),
// after
AdapterType::Dremio => dremio_get_relation(
    adapter, state, ctx, conn, database, schema, identifier, token,
),
Defensive patterns

Strategy: validation

Validate before calling

if matches!(adapter_type, AdapterType::Dremio) {
    return Err("Dremio relation lookup is not implemented yet".into());
}

Type guard

fn dremio_ready(t: &AdapterType) -> bool { !matches!(t, AdapterType::Dremio) }

Try / catch

match std::panic::catch_unwind(|| get_relation(...)) {
    Ok(r) => r,
    Err(_) => Err(AdapterError::NotImplemented("Dremio get_relation")),
}

Prevention

When it happens

Trigger: Calling `get_relation` (public) with AdapterType::Dremio; the arm at crates/dbt-adapter/src/metadata/get_relation.rs:86 executes `todo!("Dremio")`.

Common situations: Configuring dbt against a Dremio cloud/AR software project before Dremio metadata support exists; the panic fires during relation resolution for models, sources, or snapshots.

Related errors


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