dbt-labs/dbt-core · error
valid_incremental_strategies not implemented
Error message
valid_incremental_strategies not implemented
What it means
AdapterImpl::valid_incremental_strategies panics via unimplemented!() when called on adapters whose valid incremental strategies table has no entry (Athena, Starburst, Trino, Datafusion, Dremio, Oracle). The function returns the list of supported incremental strategies per adapter (Append, Merge, DeleteInsert, etc.), and these adapters simply have no mapping yet in the Rust port. The panic aborts the thread rather than returning a recoverable Result.
Source
Thrown at crates/dbt-adapter/src/adapter/adapter_impl.rs:656
Postgres | DuckDB | LakeCompute => &[Append, DeleteInsert, Merge, Microbatch],
Snowflake => &[Append, DeleteInsert, InsertOverwrite, Merge, Microbatch],
Bigquery => &[Append],
Databricks => &[
Append,
DeleteInsert,
Merge,
InsertOverwrite,
ReplaceWhere,
Microbatch,
],
Redshift => &[Append, DeleteInsert, Merge, Microbatch],
Fabric => &[Append, DeleteInsert, Merge, Microbatch],
Salesforce => &[Append, Merge],
ClickHouse => &[Append, DeleteInsert, InsertOverwrite, Microbatch, Legacy],
Spark => &[Append, Merge, InsertOverwrite, Microbatch],
Exasol => &[Append, DeleteInsert, Merge, Microbatch],
Athena | Starburst | Trino | Datafusion | Dremio | Oracle => {
unimplemented!("valid_incremental_strategies not implemented")
}
}
}
/// Redact credentials expressions from DDL statements
///
/// DatabricksAdapter https://github.com/databricks/dbt-databricks/blob/2f11abb306a400cde32b27891b766bf41a11fb1f/dbt/adapters/databricks/impl.py#L833
pub fn redact_credentials(&self, sql: &str) -> AdapterResult<String> {
if self.adapter_type() != Databricks {
return Err(AdapterError::new(
AdapterErrorKind::NotSupported,
"redact_credentials is a Databricks-specific function",
));
}
let Some(caps) = CREDENTIAL_IN_COPY_INTO_REGEX.captures(sql) else {
// WARN: Malformed input by user means credentials may leak.
// However, this _is_ the fallback strategy implemented in Python.
return Ok(sql.to_string());View on GitHub (pinned to 0267ce9170)
Solutions
- Switch to an adapter with implemented incremental strategies (e.g. Postgres, Snowflake, BigQuery, Databricks, ClickHouse, Spark, Fabric, Exasol, Salesforce).
- If the adapter must be supported, add the adapter to the match in crates/dbt-adapter/src/adapter/adapter_impl.rs:656 with its strategy list.
- Intercept the panic at the FFI/Jinja boundary or feature-gate incremental materializations for these adapters until implemented.
Example fix
// before (adapter_impl.rs:656)
Athena | Starburst | Trino | Datafusion | Dremio | Oracle => {
unimplemented!("valid_incremental_strategies not implemented")
}
// after
Athena | Starburst | Trino | Datafusion | Dremio | Oracle => {
&[Append, DeleteInsert, InsertOverwrite, Microbatch]
} Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_INCREMENTAL: &[&str] = &["postgres","snowflake","bigquery","databricks","redshift","duckdb","clickhouse","spark","fabric","exasol","salesforce"];
if !SUPPORTED_INCREMENTAL.contains(&adapter_type.as_str()) {
return Err(format!("incremental strategies not implemented for {adapter_type}"));
} Type guard
fn supports_incremental(adapter_type: &AdapterType) -> bool {
!matches!(adapter_type, AdapterType::Athena | AdapterType::Starburst | AdapterType::Trino | AdapterType::Datafusion | AdapterType::Dremio | AdapterType::Oracle)
} Prevention
- Check adapter capability before enabling incremental materialization in dbt_project.yml
- Keep an allowlist of adapters tested with incremental models
- Pin models using incremental strategies to adapters with a filled strategy table
When it happens
Trigger: Calling AdapterImpl::valid_incremental_strategies (directly or via get_incremental_strategy_macro during materialization strategy lookup) while self.adapter_type() is Athena, Starburst, Trino, Datafusion, Dremio, or Oracle.
Common situations: Running an incremental model with any of these adapters in the Rust dbt engine; using the incremental_strategy macro resolution path on an adapter whose incremental support has not been ported yet.
Related errors
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/391ae5f85f5be90d.
Report an issue: GitHub.