dbt-labs/dbt-core · error

external_volume is required

Error message

external_volume is required

What it means

While assembling Iceberg DDL options on Snowflake, no external_volume could be found on the runtime model config — CREATE ICEBERG TABLE requires an external volume, so the statement cannot be constructed and the missing-key error is raised.

Solutions

  1. Set external_volume in the model's config block
  2. Provide a project/profile-level default external volume
  3. Validate all required iceberg keys up front with a clear config error
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

                base_location.push_str(&format!(
                    "/{}/{}",
                    self.schema_as_str().unwrap_or_default(),
                    self.identifier_as_str().unwrap_or_default()
                ));

                if let Some(subpath) = runtime_model_config
                    .get_attr("base_location_subpath")?
                    .as_str()
                {
                    base_location.push_str(&format!("/{subpath}"))
                }

                let external_volume = runtime_model_config
                    .get_attr("external_volume")?
                    .as_str()
                    .ok_or_else(|| {
                        minijinja::Error::new(
                            minijinja::ErrorKind::NonKey,
                            "external_volume is required",
                        )
                    })?
                    .to_string();

                let iceberg_ddl_predicates = format!(
                    "\nexternal_volume = '{external_volume}'\ncatalog = 'snowflake'\nbase_location = '{base_location}'\n"
                );

                // Indent each line by 10 spaces
                let result = iceberg_ddl_predicates
                    .lines()
                    // the first argument is an empty string that then get 10 spaces padding
                    .map(|line| format!("{:indent$}{line}", "", indent = 10))
                    .collect::<Vec<String>>()
                    .join("\n");

View on GitHub (pinned to 0267ce9170)