dbt-labs/dbt-core · error
upload_file
Error message
upload_file
What it means
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.
Source
Thrown at crates/dbt-adapter/src/adapter/adapter_impl.rs:3828
Err(e)
}
}
}
}
adapter_type @ (Postgres | Snowflake | Databricks | Redshift | Salesforce | Spark
| DuckDB | LakeCompute | Fabric | ClickHouse | Exasol | Starburst
| Athena | Trino | Datafusion | Dremio | Oracle) => {
unimplemented!(
"is_replaceable is only available with BigQuery adapter, not {}",
adapter_type
)
}
}
}
/// BigQueryAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L956
pub fn upload_file(&self, _state: &State, _args: &[Value]) -> Result<Value, minijinja::Error> {
unimplemented!("upload_file")
}
/// BigQueryAdapter https://github.com/dbt-labs/dbt-adapters/blob/0efd8d3d1081e1ab43e38797d5104f7b424a6284/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L670
pub fn parse_partition_by(&self, partition_by: Value) -> AdapterResult<Value> {
match self.adapter_type() {
Bigquery => {
// https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-bigquery/src/dbt/adapters/bigquery/impl.py#L579-L586
// Pure config parse; safe for both BigQuery and Replay (when adapter type is BigQuery)
let raw_partition_by = partition_by;
if raw_partition_by.is_none() {
return Ok(none_value());
}
// Lowercase all string values to match dbt-core behavior
let normalized = if let Ok(partition_by_map) =
minijinja_value_to_typed_struct::<IndexMap<String, Value>>(
raw_partition_by.clone(),
) {View on GitHub (pinned to 0267ce9170)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/dbt-adapter/src/adapter/adapter_impl.rs:3828 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/7a0489fb5bed5ca0.
Report an issue: GitHub.