{"record":{"id":"5a749ad5decf2480","repo":"dbt-labs/dbt-core","slug":"load-dataframe-for-the-salesforce-adapter","errorCode":null,"errorMessage":"load_dataframe() for the Salesforce adapter","messagePattern":"load_dataframe\\(\\) for the Salesforce adapter","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/adapter_impl.rs","lineNumber":3506,"sourceCode":"                            INGEST_FILE_DELIMITER.to_string(),\n                            OptionValue::String(field_delimiter.to_string()),\n                        ),\n                        (\n                            INGEST_PATH.to_string(),\n                            OptionValue::String(file_path.to_string()),\n                        ),\n                        (\n                            INGEST_SCHEMA.to_string(),\n                            OptionValue::Bytes(serialized_ingest_schema),\n                        ),\n                    ],\n                    false,\n                    token,\n                )?;\n\n                Ok(none_value())\n            }\n            Salesforce => todo!(\"load_dataframe() for the Salesforce adapter\"),\n            Postgres | Snowflake | Databricks | Redshift | Spark | DuckDB | LakeCompute\n            | Fabric | ClickHouse | Exasol | Starburst | Athena | Trino | Datafusion | Dremio\n            | Oracle => {\n                unimplemented!(\"only available with BigQuery or Salesforce adapter\")\n            }\n        }\n    }\n\n    /// This only supports non-nested columns additions\n    ///\n    /// Since internally this is only used by snapshot materialization macro where newly added\n    /// columns all have non-nested data types, Read from\n    /// [here](https://github.com/sdf-labs/fs/blob/9b87be839f6aa54cab1ab91cde2c77855758c396/crates/dbt-loader/src/dbt_macro_assets/dbt-adapters/macros/materializations/snapshots/snapshot.sql#L32-L33).\n    /// This builds sql that creates the snapshot relation, and this relation only adds non-nested\n    /// columns to the source relation it is supposed to work well for this use case due to\n    /// limitation:\n    /// https://cloud.google.com/bigquery/docs/managing-table-schemas#add_a_nested_column_to_a_record_column\n    ///","sourceCodeStart":3488,"sourceCodeEnd":3524,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/adapter_impl.rs#L3488-L3524","documentation":"This is a Rust `todo!()` panic in `load_dataframe` of the base adapter implementation. The code explicitly handles BigQuery and falls back to a `todo!()` for the Salesforce adapter, meaning load_dataframe is declared for Salesforce in the adapter enum but its implementation was never written. Any call that routes load_dataframe to Salesforce aborts the process with the message 'load_dataframe() for the Salesforce adapter'. All other adapters (Postgres, Snowflake, etc.) hit a separate `unimplemented!()` arm.","triggerScenarios":"Calling the public `load_dataframe` method (directly or via a data-loading flow such as seed/snapshot ingestion) while connected with a Salesforce adapter profile. The match reaches the `Salesforce => todo!(...)` arm in adapter_impl.rs:3506 and panics immediately.","commonSituations":"Running a dbt operation that needs to load a DataFrame (e.g. seeds or state:relation data loading) against a Salesforce adapter because the project yml or --adapter flag selected Salesforce instead of BigQuery. Also hit by developers testing adapter coverage who assumed Salesforce support exists for this method.","solutions":["Switch the target/adapter to BigQuery for operations that require load_dataframe; Salesforce has no implementation yet.","Implement the Salesforce arm in crates/dbt-adapter/src/adapter/adapter_impl.rs around line 3506, reusing the BigQuery loading path adapted to Salesforce API limits.","Check the adapter feature matrix/issue tracker for Salesforce load_dataframe support status before using it in a pipeline.","Wrap the call site in catch_unwind or pre-check the adapter type and return a friendly error instead of panicking."],"exampleFix":"// before\nlet adapter = AdapterType::Salesforce;\nadapter.load_dataframe(df)?; // panics: todo!()\n// after\nif adapter != AdapterType::BigQuery {\n    return Err(anyhow!(\"load_dataframe is only supported for BigQuery; got {:?}\", adapter));\n}\nadapter.load_dataframe(df)?;","handlingStrategy":"type-guard","validationCode":"if adapter.adapter_type() == AdapterType::Salesforce {\n    return Err(anyhow!(\"load_dataframe is not implemented for the Salesforce adapter; use BigQuery\"));\n}","typeGuard":"fn supports_load_dataframe(t: AdapterType) -> bool { matches!(t, AdapterType::BigQuery) }","tryCatchPattern":"let result = std::panic::catch_unwind(AssertUnwindSafe(|| adapter.load_dataframe(df)));\nmatch result {\n    Ok(v) => v?,\n    Err(_) => return Err(anyhow!(\"load_dataframe panicked: not implemented for this adapter\")),\n}","preventionTips":["Check the adapter type against the supported list before invoking load_dataframe","Consult the adapter feature matrix for load_dataframe support (currently BigQuery only)","Avoid selecting Salesforce profiles for seed/data-loading workflows","Pin CI tests to adapters whose load_dataframe arm is implemented"],"tags":["rust","adapter","todo-panic","salesforce","unimplemented"],"backgroundTag":"method-not-implemented","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}