dbt-labs/dbt-core · error

Oracle

Error message

Oracle

What it means

This is a Rust `todo!()` panic from `create_static_relation` in crates/dbt-adapter/src/relation/factory.rs:31. The `Oracle` match arm is an unimplemented placeholder, so a call resolving to `AdapterType::Oracle` panics with the message 'Oracle'. The library raises it as a deliberate marker that Oracle static relation creation is not implemented.

Source

Thrown at crates/dbt-adapter/src/relation/factory.rs:31

pub fn create_static_relation(
    adapter_type: AdapterType,
    quoting: ResolvedQuoting,
) -> Option<Value> {
    use AdapterType::*;
    let result = match adapter_type {
        Snowflake | Databricks | Spark | Fabric | DuckDB | LakeCompute | Exasol | Postgres
        | Redshift | Salesforce | Bigquery | ClickHouse => {
            let relation_type = RelationStatic {
                adapter_type,
                quoting,
            };
            StaticBaseRelationObject::new(Arc::new(relation_type))
        }
        Starburst => todo!("Starburst"),
        Athena => todo!("Athena"),
        Trino => todo!("Trino"),
        Dremio => todo!("Dremio"),
        Oracle => todo!("Oracle"),
        Datafusion => todo!("Datafusion"),
    };
    Some(Value::from_object(result))
}

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Implement the `Oracle` arm in `create_static_relation`, building the Oracle-specific `RelationStatic`/`StaticBaseRelationObject`
  2. Reject or fall back for `AdapterType::Oracle` at call sites until the arm is implemented
  3. Use an adapter with a complete factory arm while Oracle support is pending

Example fix

// before
Oracle => todo!("Oracle"),
// after
Oracle => {
    let relation_type = RelationStatic { adapter_type, quoting };
    StaticBaseRelationObject::new(Arc::new(relation_type))
}
Defensive patterns

Strategy: validation

Validate before calling

if matches!(adapter_type, AdapterType::Oracle) {
    return Err("create_static_relation is not implemented for Oracle".into());
}

Type guard

fn static_relation_supported(t: AdapterType) -> bool {
    !matches!(t, AdapterType::Oracle | AdapterType::Starburst | AdapterType::Athena | AdapterType::Trino | AdapterType::Dremio | AdapterType::Datafusion)
}

Try / catch

match std::panic::catch_unwind(|| create_static_relation(adapter_type)) {
    Ok(v) => v,
    Err(_) => return Err("create_static_relation unimplemented for Oracle"),
}

Prevention

When it happens

Trigger: Calling `create_static_relation` (directly, via `get_value`/`adapter_api_value`, or via the static-relation quote-policy tests) with `adapter_type == AdapterType::Oracle`.

Common situations: An Oracle-profiled dbt run where jinja code calls `api.Relation.create` through the static factory; a test matrix over all adapter types; wiring an Oracle adapter integration before completing the match arm.

Related errors


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