risingwavelabs/risingwave · error · anyhow::Error

Unsupported catalog type

Error message

Unsupported catalog type: {}, only support `storage`, `rest`, `hive`, `jdbc`, `glue`, `snowflake`

What it means

`IcebergCatalog::resolve` matches the user-supplied `catalog.type` against the set of supported catalogs (storage, rest, hive, jdbc, glue, snowflake; plus test-only mocks). Any other string hits the catch-all arm and bails. It is a strict whitelist check on an enum-like config value.

Solutions

  1. Change `catalog.type` to one of: storage, rest, hive, jdbc, glue, snowflake.
  2. Fix casing/typos — values are matched case-sensitively in lowercase.
  3. If the target catalog is genuinely unsupported (e.g. Nessie), front it via a REST catalog or use a different integration.

Example fix

// before
with (
  connector = 'iceberg',
  catalog.type = 'nessie'
)
// after
with (
  connector = 'iceberg',
  catalog.type = 'rest',
  catalog.uri = 'https://rest-catalog.example.com'
)
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = new Set(['storage','rest','hive','jdbc','glue','snowflake']);
if (!SUPPORTED.has(opts['catalog.type'])) {
  throw new Error(`catalog.type must be one of ${[...SUPPORTED].join(', ')}`);
}

Type guard

const isCatalogType = (v) => ['storage','rest','hive','jdbc','glue','snowflake'].includes(v);

Try / catch

catch (e) { if (String(e).includes('Unsupported catalog type')) { /* surface allowed values */ } else { throw e; } }

Prevention

When it happens

Trigger: Passing `catalog.type` values such as 'hadoop', 'nessie', 'sql', 'dynamodb', or misspellings like 'REST'/'Glue' (matching is case-sensitive) into an Iceberg source/sink `with` options.

Common situations: Copying catalog config from iceberg-java or other engines that support catalogs RisingWave does not (Nessie, Hadoop, JDBC variants); typos or wrong casing in catalog.type.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/32c7c274353ee66a. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/connector_common/iceberg/mod.rs:331

impl IcebergCatalogKind {
    fn resolve(common: &IcebergCommon) -> ConnectorResult<Self> {
        let catalog_type = common.catalog_type();
        let kind = match catalog_type {
            "storage" => Self::Storage,
            "rest" if common.vended_credentials() => Self::Rest(IcebergCatalogRuntime::NativeRust),
            "rest" => Self::Rest(IcebergCatalogRuntime::JavaJni),
            "rest_rust" => Self::Rest(IcebergCatalogRuntime::NativeRust),
            "glue" => Self::Glue(IcebergCatalogRuntime::JavaJni),
            "glue_rust" => Self::Glue(IcebergCatalogRuntime::NativeRust),
            "hive" => Self::Hive,
            "jdbc" => Self::Jdbc,
            "snowflake" => Self::Snowflake,
            #[cfg(any(test, madsim))]
            "mock_v3" => Self::Mock,
            "mock" => Self::Mock,
            _ => {
                bail!(
                    "Unsupported catalog type: {}, only support `storage`, `rest`, `hive`, `jdbc`, `glue`, `snowflake`",
                    catalog_type
                )
            }
        };
        Ok(kind)
    }

    pub fn is_rest(self) -> bool {
        matches!(self, Self::Rest(_))
    }

    fn jni_impl(self) -> Option<JniCatalogImpl> {
        match self {
            Self::Rest(IcebergCatalogRuntime::JavaJni) => Some(JniCatalogImpl::Rest),
            Self::Glue(IcebergCatalogRuntime::JavaJni) => Some(JniCatalogImpl::Glue),
            Self::Hive => Some(JniCatalogImpl::Hive),
            Self::Jdbc => Some(JniCatalogImpl::Jdbc),

View on GitHub (pinned to 6469eb736d)