dbt-labs/dbt-core · error

Salesforce column creation not implemented yet

Error message

Salesforce column creation not implemented yet

What it means

A `todo!()` panic in `ColumnBuilder::build_from_parts` (column_builder.rs:106) for the Salesforce adapter. The manual Column construction path (used when precision/scale are supplied explicitly) has no Salesforce arm, so constructing a Column for Salesforce panics with 'Salesforce column creation not implemented yet'.

Solutions

  1. Avoid the Salesforce adapter for workflows that rebuild columns from parts until implemented.
  2. Implement the Salesforce arm in column_builder.rs:106, choosing appropriate precision/scale semantics for Salesforce (SOQL decimal precision).
  3. Replace `todo!()` with a clear unsupported-adapter error so callers can handle it.

Example fix

// before
Salesforce => todo!("Salesforce column creation not implemented yet"),
// after
Salesforce => Ok(Column::new(
    Salesforce, name, dtype, char_size, numeric_precision, numeric_scale,
)),
Defensive patterns

Strategy: type-guard

Validate before calling

if adapter == AdapterType::Salesforce {
    return Err(anyhow!("Salesforce column creation is not implemented; cannot build_from_parts"));
}

Type guard

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

Try / catch

let res = std::panic::catch_unwind(AssertUnwindSafe(|| builder.build_from_parts(name, dtype, char_size, p, s)));
match res { Ok(c) => c, Err(_) => Err(anyhow!("unsupported adapter for build_from_parts")) }

Prevention

When it happens

Trigger: Calling the public `build_from_parts(name, dtype, char_size, numeric_precision, numeric_scale)` with adapter type Salesforce — e.g. when relation/column metadata is rebuilt with explicit numeric precision from a schema definition.

Common situations: Column metadata reconstruction on a Salesforce adapter profile where a parsed schema carries numeric_precision/scale; also from adapter-coverage tests that sweep all adapter variants through build_from_parts.

Related errors


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

Appendix: source

Thrown at crates/dbt-adapter/src/column/column_builder.rs:106

            // TODO: BigQuery fields
            Bigquery => Column::new_bigquery(name, dtype, &[], mode.unwrap_or_default()),
            Redshift => Column::new(
                Redshift,
                name,
                dtype,
                char_size,
                numeric_precision,
                numeric_scale,
            ),
            Databricks | Spark => Column::new(
                self.adapter_type,
                name,
                dtype,
                char_size,
                None, // numeric_precision
                None, // numeric_scale
            ),
            Salesforce => todo!("Salesforce column creation not implemented yet"),
            ClickHouse => Column::new(
                ClickHouse,
                name,
                dtype,
                char_size,
                numeric_precision,
                numeric_scale,
            ),
            Exasol => Column::new(
                Exasol,
                name,
                dtype,
                char_size,
                numeric_precision,
                numeric_scale,
            ),
            Starburst => todo!("Starburst"),
            Athena => todo!("Athena"),

View on GitHub (pinned to 0267ce9170)