dbt-labs/dbt-core · error

Only available for snowflake

Error message

Only available for snowflake

What it means

get_ddl_prefix_for_create hit its Snowflake-only branch (transient/iceberg table prefixes) while the relation belongs to a different adapter — the guard fires because the Snowflake DDL prefix semantics are being requested for a non-Snowflake adapter.

Solutions

  1. Gate the calling macro on adapter type (is_snowflake) before requesting the prefix
  2. Add the equivalent branch for the target adapter's dialect
  3. Fall back to the generic (empty) prefix for non-Snowflake adapters
Defensive patterns

Strategy: type-guard

When it happens

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

Appendix: source

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

                            self.path.schema.as_deref().unwrap_or(""),
                            self.path.identifier.as_deref().unwrap_or("")
                        );
                    }
                    return Ok("iceberg".to_string());
                }

                let is_transient = config
                    .get_item(&Value::from("transient"))
                    .map(|v| v.is_true() || v.is_undefined())
                    .unwrap_or(true);

                Ok(if is_transient {
                    "transient".to_string()
                } else {
                    String::new()
                })
            }
            _ => Err(minijinja::Error::new(
                minijinja::ErrorKind::InvalidOperation,
                "Only available for snowflake",
            )),
        }
    }

    /// https://github.com/dbt-labs/dbt-adapters/blob/2a94cc75dba1f98fa5caff1f396f5af7ee444598/dbt-snowflake/src/dbt/adapters/snowflake/relation.py#L206
    fn get_iceberg_ddl_options(
        &self,
        runtime_model_config: Value,
    ) -> Result<String, minijinja::Error> {
        match self.adapter_type {
            AdapterType::Snowflake => {
                // If the base_location_root config is supplied, overwrite the default value ("_dbt/")
                let mut base_location = runtime_model_config
                    .get_attr("base_location_root")?
                    .as_str()
                    .unwrap_or("_dbt")

View on GitHub (pinned to 0267ce9170)