dbt-labs/dbt-core · error
Athena
Error message
Athena
What it means
A `todo!()` panic in `ColumnBuilder::build` (column_builder.rs:37) for the Athena adapter. The adapter-to-column-builder dispatch has no Athena implementation, so converting an Arrow schema into column metadata while connected to Athena panics with the message 'Athena'.
Source
Thrown at crates/dbt-adapter/src/column/column_builder.rs:37
pub fn new(adapter_type: AdapterType) -> Self {
Self { adapter_type }
}
pub fn build(&self, field: &FieldRef, type_ops: &dyn TypeOps) -> AdapterResult<Column> {
use AdapterType::*;
match self.adapter_type {
Snowflake => Ok(Self::build_snowflake(field, type_ops)),
Bigquery => Ok(Self::build_bigquery(field, type_ops)),
Databricks | Spark => Ok(Self::build_databricks(field, type_ops)),
Redshift => Ok(Self::build_redshift(field, type_ops)),
Postgres | Salesforce | DuckDB | LakeCompute => {
Ok(Self::build_postgres_like(field, type_ops))
}
Fabric => Ok(Self::build_fabric(field, type_ops)),
ClickHouse => Self::build_clickhouse(field, type_ops),
Exasol => Ok(Self::build_exasol(field, type_ops)),
Starburst => todo!("Starburst"),
Athena => todo!("Athena"),
Trino => todo!("Trino"),
Dremio => todo!("Dremio"),
Oracle => todo!("Oracle"),
Datafusion => todo!("Datafusion"),
}
}
pub fn build_from_parts(
&self,
name: String,
dtype: String,
char_size: Option<u32>,
numeric_precision: Option<u64>,
numeric_scale: Option<u64>,
mode: Option<BigqueryColumnMode>,
) -> Column {
use AdapterType::*;
match self.adapter_type {View on GitHub (pinned to 0267ce9170)
Solutions
- Switch to a supported adapter for schema/column operations until Athena is implemented.
- Implement the Athena arm in column_builder.rs:37, likely delegating to `build_postgres_like` since Athena (Presto-derived) column types map similarly.
- Return a descriptive DbtError instead of `todo!()` so callers get a catchable error rather than an abort.
Example fix
// before
Athena => todo!("Athena"),
// after
Athena => Ok(Self::build_postgres_like(field, type_ops)), Defensive patterns
Strategy: type-guard
Validate before calling
if adapter == AdapterType::Athena {
return Err(anyhow!("Athena column building is not implemented yet"));
} Type guard
fn build_supported(t: AdapterType) -> bool {
matches!(t, Postgres | Salesforce | DuckDB | LakeCompute | Fabric | ClickHouse | Exasol)
} Try / catch
std::panic::catch_unwind(AssertUnwindSafe(|| builder.build(field, type_ops)))
.map_err(|_| anyhow!("column building not implemented for this adapter"))? Prevention
- Skip Athena in schema-introspection features until the arm exists
- Contribute an Athena arm delegating to build_postgres_like
- Test each adapter variant against ColumnBuilder::build in CI
- Track adapter coverage in a feature matrix to avoid runtime surprises
When it happens
Trigger: Calling schema_to_columns, get_column_schema_from_query, or update_node_columns (directly or via catalog generation / query result introspection) with the adapter type set to Athena.
Common situations: Running docs generation or a schema-aware operation on an Athena adapter profile. Also hit when a test suite exercises Athena adapter coverage before the builder arm exists.
Related errors
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/2588676ae3085e46.
Report an issue: GitHub.