apache/iceberg · error · UnsupportedOperationException

SnowflakeCatalog does not currently support setProperties

Error message

SnowflakeCatalog does not currently support setProperties

What it means

SnowflakeCatalog explicitly refuses namespace property updates. Iceberg's SupportsNamespaces interface allows setting and removing namespace-level properties, but the Snowflake catalog backend has no representation for them, so it throws UnsupportedOperationException instead of silently no-opping. Any call to setProperties on this catalog will always fail.

Source

Thrown at snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java:232

                id, namespace));
    }
    if (namespaceExists) {
      return ImmutableMap.of();
    } else {
      throw new NoSuchNamespaceException(
          "Namespace '%s' with snowflake identifier '%s' doesn't exist", namespace, id);
    }
  }

  @Override
  public boolean dropNamespace(Namespace namespace) {
    throw new UnsupportedOperationException(
        "SnowflakeCatalog does not currently support dropNamespace");
  }

  @Override
  public boolean setProperties(Namespace namespace, Map<String, String> properties) {
    throw new UnsupportedOperationException(
        "SnowflakeCatalog does not currently support setProperties");
  }

  @Override
  public boolean removeProperties(Namespace namespace, Set<String> properties) {
    throw new UnsupportedOperationException(
        "SnowflakeCatalog does not currently support removeProperties");
  }

  @Override
  protected TableOperations newTableOps(TableIdentifier tableIdentifier) {
    String fileIOImpl = DEFAULT_FILE_IO_IMPL;
    if (catalogProperties.containsKey(CatalogProperties.FILE_IO_IMPL)) {
      fileIOImpl = catalogProperties.get(CatalogProperties.FILE_IO_IMPL);
    }

    // Initialize a fresh FileIO for each TableOperations created, because some FileIO
    // implementations such as S3FileIO can become bound to a single S3 bucket. Additionally,

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Avoid namespace property mutations on SnowflakeCatalog; store such metadata outside the catalog (e.g. in the table properties via alterTable).
  2. Check catalog capabilities before mutating: only call setProperties when the catalog is not SnowflakeCatalog (or feature-detect via a capability check).
  3. If the feature is needed, use a different catalog (Hadoop/Hive/JDBC/Nessie) or contribute setProperties support to the Snowflake integration.
  4. For engine sessions, guard SQL: skip 'ALTER NAMESPACE ... SET PROPERTIES' statements when the catalog is the Snowflake one.

Example fix

// before
catalog.setProperties(Namespace.of("db"), Map.of("owner", "team"));
// after
if (!(catalog instanceof SnowflakeCatalog)) {
  catalog.setProperties(Namespace.of("db"), Map.of("owner", "team"));
}
Defensive patterns

Strategy: validation

Validate before calling

if (catalog instanceof SnowflakeCatalog) {
  throw new IllegalStateException("SnowflakeCatalog cannot set namespace properties");
}

Type guard

boolean supportsNamespaceProps = !(catalog instanceof SnowflakeCatalog);

Prevention

When it happens

Trigger: Calling catalog.setProperties(namespace, props) (directly or via Spark/Flink ALTER NAMESPACE ... SET PROPERTIES or SupportsNamespaces tooling) on a SnowflakeCatalog instance.

Common situations: Applying shared config scripts that set namespace properties across catalogs; migration tooling that assumes all catalogs support SupportsNamespaces mutations; users trying to attach metadata (e.g. descriptions, retention hints) to Snowflake namespaces.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/b25931b09bc4025c. Report an issue: GitHub.