dbt-labs/dbt-core · error

only Snowflake/Bigquery ever egress INFO_SCHEMA

Error message

only Snowflake/Bigquery ever egress INFO_SCHEMA

What it means

Invariant marker in CatalogType::parse_from_str (catalogs v2): the INFO_SCHEMA egress token is only ever selected for Snowflake and BigQuery adapters. The parser accepts the adapter-specific raw string, but the gate guarantees no other adapter can reach the INFO_SCHEMA path — reaching it for another adapter would be a dispatch bug.

Solutions

  1. Keep INFO_SCHEMA handling gated on AdapterType::Snowflake | AdapterType::Bigquery
  2. Return a validation error if another adapter attempts to select INFO_SCHEMA
  3. Add a pinning test whenever a new INFO_SCHEMA-capable adapter is introduced
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at crates/dbt-schemas/src/schemas/dbt_catalogs_v2.rs:736 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/c7d461e203eacb91. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-schemas/src/schemas/dbt_catalogs_v2.rs:736

    pub fn parse_from_str(raw: &str, adapter_type: dbt_adapter_core::AdapterType) -> Self {
        match raw {
            "horizon" => Self::Horizon,
            "glue" => Self::Glue,
            // "ICEBERG_REST" only exists on the Jinja plane. Model configs should
            // be lowercase to obscure the internal uppercase as much as possible.
            "iceberg_rest" => Self::IcebergRest,
            "hive_metastore" => Self::HiveMetastore,
            "unity" => Self::Unity,
            "biglake_metastore" => Self::BiglakeMetastore,
            "ducklake" => Self::DuckLake,
            "local_filesystem" => Self::LocalFilesystem,
            "BUILT_IN" => Self::SnowflakeBuiltIn,
            "duckdb" => Self::DuckdbNative,
            "INFO_SCHEMA" => match adapter_type {
                dbt_adapter_core::AdapterType::Bigquery => Self::BigqueryNative,
                dbt_adapter_core::AdapterType::Snowflake => Self::SnowflakeNative,
                _ => unreachable!("only Snowflake/Bigquery ever egress INFO_SCHEMA"),
            },
            _ => unreachable!("not a CatalogType::as_str() output"),
        }
    }
}

impl serde::Serialize for CatalogType {
    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
        serializer.serialize_str(self.as_str())
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum TableFormat {
    Default,
    Iceberg,
}

View on GitHub (pinned to 0267ce9170)