dbt-labs/dbt-core · error

SalesforceAdapter does not implement build_columns_from_get_

Error message

SalesforceAdapter does not implement build_columns_from_get_columns

What it means

build_columns_from_get_columns converts a RecordBatch from the driver's get-columns call into per-table ColumnMetadata maps. SalesforceAdapter stubs this trait method with unimplemented!(), so any attempt to build column metadata through this path panics unconditionally — the Salesforce adapter does not implement this catalog conversion step.

Source

Thrown at crates/dbt-adapter/src/metadata/salesforce/mod.rs:43

impl MetadataAdapter for SalesforceMetadataAdapter {
    fn adapter_type(&self) -> AdapterType {
        AdapterType::Salesforce
    }

    fn build_schemas_from_stats_sql(
        &self,
        _: Arc<RecordBatch>,
    ) -> AdapterResult<BTreeMap<String, dbt_schemas::schemas::legacy_catalog::CatalogTable>> {
        unimplemented!("SalesforceAdapter does not implement build_schemas_from_stats_sql");
    }

    fn build_columns_from_get_columns(
        &self,
        _: Arc<RecordBatch>,
    ) -> AdapterResult<
        BTreeMap<String, BTreeMap<String, dbt_schemas::schemas::legacy_catalog::ColumnMetadata>>,
    > {
        unimplemented!("SalesforceAdapter does not implement build_columns_from_get_columns");
    }

    fn list_user_defined_functions_inner(
        &self,
        _catalog_schemas: &BTreeMap<String, BTreeSet<String>>,
        _token: CancellationToken,
    ) -> AsyncAdapterResult<'_, Vec<UDF>> {
        let future = std::future::ready(Ok(Default::default()));
        Box::pin(future)
    }

    fn list_relations_schemas_inner(
        &self,
        _unique_id: Option<String>,
        _phase: Option<ExecutionPhase>,
        _relations: &[Arc<dyn BaseRelation>],
        _token: CancellationToken,
    ) -> AsyncAdapterResult<'_, HashMap<String, AdapterResult<Arc<Schema>>>> {

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Exclude Salesforce adapters from catalog/column-metadata harvesting workflows.
  2. Use Salesforce's own schema discovery (describe objects via the API) instead of the RecordBatch get-columns path.
  3. If needed, implement build_columns_from_get_columns for SalesforceAdapter mapping SObject fields to ColumnMetadata.
Defensive patterns

Strategy: fallback

Validate before calling

if adapter.type() == "salesforce" { use_salesforce_describe_metadata(); }

Type guard

fn supports_get_columns_metadata(t: &AdapterType) -> bool { *t != AdapterType::Salesforce }

Prevention

When it happens

Trigger: Invoking SalesforceAdapter::build_columns_from_get_columns, e.g. during docs/catalog generation or cache population that routes through the get_columns RecordBatch path for Salesforce connections.

Common situations: Running 'dbt docs generate' or catalog ingestion against a Salesforce profile; generic tooling that calls the metadata builder uniformly across adapters; tests exercising the full metadata pipeline with a Salesforce adapter instance.

Related errors


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