{"record":{"id":"7a0489fb5bed5ca0","repo":"dbt-labs/dbt-core","slug":"upload-file","errorCode":null,"errorMessage":"upload_file","messagePattern":"upload_file","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/adapter/adapter_impl.rs","lineNumber":3828,"sourceCode":"                            Err(e)\n                        }\n                    }\n                }\n            }\n            adapter_type @ (Postgres | Snowflake | Databricks | Redshift | Salesforce | Spark\n            | DuckDB | LakeCompute | Fabric | ClickHouse | Exasol | Starburst\n            | Athena | Trino | Datafusion | Dremio | Oracle) => {\n                unimplemented!(\n                    \"is_replaceable is only available with BigQuery adapter, not {}\",\n                    adapter_type\n                )\n            }\n        }\n    }\n\n    /// BigQueryAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L956\n    pub fn upload_file(&self, _state: &State, _args: &[Value]) -> Result<Value, minijinja::Error> {\n        unimplemented!(\"upload_file\")\n    }\n\n    /// BigQueryAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L670\n    pub fn parse_partition_by(&self, partition_by: Value) -> AdapterResult<Value> {\n        match self.adapter_type() {\n            Bigquery => {\n                // https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L579-L586\n                // Pure config parse; safe for both BigQuery and Replay (when adapter type is BigQuery)\n                let raw_partition_by = partition_by;\n                if raw_partition_by.is_none() {\n                    return Ok(none_value());\n                }\n\n                // Lowercase all string values to match dbt-core behavior\n                let normalized = if let Ok(partition_by_map) =\n                    minijinja_value_to_typed_struct::<IndexMap<String, Value>>(\n                        raw_partition_by.clone(),\n                    ) {","sourceCodeStart":3810,"sourceCodeEnd":3846,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/adapter/adapter_impl.rs#L3810-L3846","documentation":"This panic marks a capability gap in the BigQuery-only path of upload_file: the surrounding code checks whether the target table is replaceable (is_replaceable), and for every adapter other than BigQuery (Postgres, Snowflake, Databricks, Redshift, Salesforce, Spark, DuckDB, LakeCompute, Fabric, ClickHouse, Exasol, Starburst, Athena, Trino, Datafusion, Dremio, Oracle) that check is not implemented, so reaching it aborts with this unimplemented! message. It fires when upload_file is invoked with one of these adapter types instead of BigQuery.","triggerScenarios":"Thrown at crates/dbt-adapter/src/adapter/adapter_impl.rs:3828 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Implement per-adapter upload (PUT/stage commands) where the warehouse supports it","Return an unsupported AdapterError instead of todo!()","Use load_dataframe-style paths that don't require explicit file uploads"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}