dbt-labs/dbt-core · error

from_config: Failed to serialize SnowflakeDescribeResults

Error message

from_config: Failed to serialize SnowflakeDescribeResults: {e}

What it means

While building the dynamic-table config changeset, the parsed Snowflake DESCRIBE results could not be serialized back into a Value — the describe output did not round-trip through SnowflakeDescribeResults' expected shape (missing/extra fields), surfacing as a serialization error at from_config.

Solutions

  1. Check that the Snowflake DESCRIBE output matches SnowflakeDescribeResults' fields for this role/edition
  2. Add serde defaults for optional describe columns so partial output round-trips
  3. Propagate the serde error with field context instead of a generic message
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-adapter/src/relation/relation_impl.rs:596 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/4532470e2c48e711. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-adapter/src/relation/relation_impl.rs:596

/// alone, so only this direction is decided here.
fn target_lag_newly_set(desired_state: &RelationConfig, current_state: &RelationConfig) -> bool {
    matches!(
        (target_lag_of(current_state), target_lag_of(desired_state)),
        (Some(None), Some(Some(_)))
    )
}

fn dynamic_table_config_changeset_from_local_config(
    local_config: &dyn InternalDbtNodeAttributes,
    relation_results_value: &Value,
) -> Result<Value, minijinja::Error> {
    let config_relation_type = SnowflakeConfigRelationType::of(local_config);
    let relation_results = SnowflakeDescribeResults::from_value_with_key(
        relation_results_value,
        config_relation_type.describe_result_key(),
    )
    .map_err(|e| {
        minijinja::Error::new(
            minijinja::ErrorKind::SerdeDeserializeError,
            format!("from_config: Failed to serialize SnowflakeDescribeResults: {e}"),
        )
    })?;

    let loader = config_relation_type.loader();
    let current_state = loader.from_remote_state(&relation_results)?;
    let desired_state = loader.from_local_config(local_config)?;

    let mut changeset = RelationConfig::diff(&desired_state, &current_state);
    if config_relation_type == SnowflakeConfigRelationType::InteractiveTable
        && target_lag_newly_set(&desired_state, &current_state)
    {
        changeset = changeset.forcing_full_refresh();
    }

    if changeset.is_empty() {
        Ok(none_value())

View on GitHub (pinned to 0267ce9170)