dbt-labs/dbt-core · critical
Dremio
Error message
Dremio
What it means
A `todo!()` panic raised when `metadata_adapter` attempts to build a metadata adapter for the Dremio adapter type. The dispatch match in crates/dbt-adapter/src/adapter/adapter_impl.rs:318-323 leaves Dremio unimplemented, so hitting that arm panics with the message "Dremio". It is a compile-time placeholder that becomes a runtime abort when the Dremio path is exercised.
Source
Thrown at crates/dbt-adapter/src/adapter/adapter_impl.rs:322
DuckDB => {
Box::new(DuckDBMetadataAdapter::new(engine)) as Box<dyn MetadataAdapter>
}
LakeCompute => {
Box::new(DuckDBMetadataAdapter::new(engine)) as Box<dyn MetadataAdapter>
}
Fabric => {
Box::new(FabricMetadataAdapter::new(engine)) as Box<dyn MetadataAdapter>
}
ClickHouse => Box::new(ClickHouseMetadataAdapter::new(engine))
as Box<dyn MetadataAdapter>,
Exasol => {
Box::new(ExasolMetadataAdapter::new(engine)) as Box<dyn MetadataAdapter>
}
Starburst => todo!("Starburst"),
Athena => todo!("Athena"),
Trino => todo!("Trino"),
Datafusion => todo!("Datafusion"),
Dremio => todo!("Dremio"),
Oracle => todo!("Oracle"),
};
Some(metadata_adapter)
}
}
}
/// Execute `use warehouse [name]` statement for Snowflake.
/// For other warehouses, this is noop.
/// Returns whether the connection changed and must be restored.
pub fn use_warehouse(
&self,
conn: &'_ mut dyn Connection,
warehouse: String,
node_id: &str,
token: CancellationToken,
) -> FsResult<bool> {
match self.inner_adapter() {View on GitHub (pinned to 0267ce9170)
Solutions
- Use a supported adapter type (Snowflake, Bigquery, Databricks, Redshift, Postgres, DuckDB, Fabric, ClickHouse, Exasol, etc.) until Dremio is implemented.
- Implement the Dremio arm: replace `Dremio => todo!("Dremio")` with a Dremio metadata adapter construction, e.g. `Box::new(DremioMetadataAdapter::new(engine)) as Box<dyn MetadataAdapter>`.
- Run in sidecar mode so metadata hydration is delegated to db_runner and this match is never reached.
Example fix
// before
Dremio => todo!("Dremio"),
// after
Dremio => Box::new(DremioMetadataAdapter::new(engine)) as Box<dyn MetadataAdapter>, Defensive patterns
Strategy: validation
Validate before calling
fn requires_unimplemented_arm(t: AdapterType) -> bool {
matches!(t, AdapterType::Starburst | AdapterType::Athena | AdapterType::Trino
| AdapterType::Datafusion | AdapterType::Dremio | AdapterType::Oracle)
}
// call before runs:
if requires_unimplemented_arm(adapter.adapter_type()) {
return Err(format!("adapter {:?} is not yet supported", adapter.adapter_type()).into());
} Type guard
fn is_dremio_unsupported(t: &AdapterType) -> bool {
matches!(t, AdapterType::Dremio)
} Try / catch
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| adapter.metadata_adapter()));
match result {
Err(_) => eprintln!("Dremio metadata adapter is not implemented; aborting gracefully"),
Ok(v) => { /* proceed */ }
} Prevention
- Gate Dremio profiles behind a feature flag that errors at startup.
- Validate the target's adapter type against implemented engines before dispatching.
- Use sidecar mode for metadata hydration when the in-process adapter is unimplemented.
- Monitor repository issues for Dremio support before adopting it.
When it happens
Trigger: Calling `metadata_adapter()` on a DbtAdapter whose adapter_type() is AdapterType::Dremio in non-sidecar, non-explicit-mock mode.
Common situations: Running dbt with a Dremio profile against this adapter before Dremio support exists; switching profiles or CI matrices to Dremio while the metadata layer is unfinished; generic adapter-type iteration in tooling.
Related errors
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/63e4bac5fca3b192.
Report an issue: GitHub.