{"record":{"id":"b25931b09bc4025c","repo":"apache/iceberg","slug":"snowflakecatalog-does-not-currently-support-setpro","errorCode":null,"errorMessage":"SnowflakeCatalog does not currently support setProperties","messagePattern":"SnowflakeCatalog does not currently support setProperties","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java","lineNumber":232,"sourceCode":"                id, namespace));\n    }\n    if (namespaceExists) {\n      return ImmutableMap.of();\n    } else {\n      throw new NoSuchNamespaceException(\n          \"Namespace '%s' with snowflake identifier '%s' doesn't exist\", namespace, id);\n    }\n  }\n\n  @Override\n  public boolean dropNamespace(Namespace namespace) {\n    throw new UnsupportedOperationException(\n        \"SnowflakeCatalog does not currently support dropNamespace\");\n  }\n\n  @Override\n  public boolean setProperties(Namespace namespace, Map<String, String> properties) {\n    throw new UnsupportedOperationException(\n        \"SnowflakeCatalog does not currently support setProperties\");\n  }\n\n  @Override\n  public boolean removeProperties(Namespace namespace, Set<String> properties) {\n    throw new UnsupportedOperationException(\n        \"SnowflakeCatalog does not currently support removeProperties\");\n  }\n\n  @Override\n  protected TableOperations newTableOps(TableIdentifier tableIdentifier) {\n    String fileIOImpl = DEFAULT_FILE_IO_IMPL;\n    if (catalogProperties.containsKey(CatalogProperties.FILE_IO_IMPL)) {\n      fileIOImpl = catalogProperties.get(CatalogProperties.FILE_IO_IMPL);\n    }\n\n    // Initialize a fresh FileIO for each TableOperations created, because some FileIO\n    // implementations such as S3FileIO can become bound to a single S3 bucket. Additionally,","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java#L214-L250","documentation":"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.","triggerScenarios":"Calling catalog.setProperties(namespace, props) (directly or via Spark/Flink ALTER NAMESPACE ... SET PROPERTIES or SupportsNamespaces tooling) on a SnowflakeCatalog instance.","commonSituations":"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.","solutions":["Avoid namespace property mutations on SnowflakeCatalog; store such metadata outside the catalog (e.g. in the table properties via alterTable).","Check catalog capabilities before mutating: only call setProperties when the catalog is not SnowflakeCatalog (or feature-detect via a capability check).","If the feature is needed, use a different catalog (Hadoop/Hive/JDBC/Nessie) or contribute setProperties support to the Snowflake integration.","For engine sessions, guard SQL: skip 'ALTER NAMESPACE ... SET PROPERTIES' statements when the catalog is the Snowflake one."],"exampleFix":"// before\ncatalog.setProperties(Namespace.of(\"db\"), Map.of(\"owner\", \"team\"));\n// after\nif (!(catalog instanceof SnowflakeCatalog)) {\n  catalog.setProperties(Namespace.of(\"db\"), Map.of(\"owner\", \"team\"));\n}","handlingStrategy":"validation","validationCode":"if (catalog instanceof SnowflakeCatalog) {\n  throw new IllegalStateException(\"SnowflakeCatalog cannot set namespace properties\");\n}","typeGuard":"boolean supportsNamespaceProps = !(catalog instanceof SnowflakeCatalog);","tryCatchPattern":null,"preventionTips":["Don't script SupportsNamespaces mutations generically across catalogs","Store namespace-level metadata in table properties or an external store for Snowflake","Feature-check catalog capabilities before ALTER NAMESPACE operations"],"tags":["unsupported-operation","snowflake-catalog","namespace-properties"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}