apache/iceberg · warning · UnsupportedOperationException
SnowflakeCatalog does not currently support dropTable
Error message
SnowflakeCatalog does not currently support dropTable
What it means
SnowflakeCatalog.dropTable is unimplemented: Snowflake-managed Iceberg tables cannot be dropped through this catalog, so the method always throws UnsupportedOperationException. Dropping must be done on the Snowflake side (or via Snowflake SQL), not through the Iceberg catalog API.
Source
Thrown at snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java:95
@Override
public List<TableIdentifier> listTables(Namespace namespace) {
SnowflakeIdentifier scope = NamespaceHelpers.toSnowflakeIdentifier(namespace);
Preconditions.checkArgument(
scope.type() == SnowflakeIdentifier.Type.SCHEMA,
"listTables must be at SCHEMA level; got %s from namespace %s",
scope,
namespace);
List<SnowflakeIdentifier> sfTables = snowflakeClient.listIcebergTables(scope);
return sfTables.stream()
.map(NamespaceHelpers::toIcebergTableIdentifier)
.collect(Collectors.toList());
}
@Override
public boolean dropTable(TableIdentifier identifier, boolean purge) {
throw new UnsupportedOperationException(
"SnowflakeCatalog does not currently support dropTable");
}
@Override
public void renameTable(TableIdentifier from, TableIdentifier to) {
throw new UnsupportedOperationException(
"SnowflakeCatalog does not currently support renameTable");
}
@Override
public void initialize(String name, Map<String, String> properties) {
String uri = properties.get(CatalogProperties.URI);
Preconditions.checkArgument(null != uri, "JDBC connection URI is required");
try {
// We'll ensure the expected JDBC driver implementation class is initialized through
// reflection regardless of which classloader ends up using this JdbcSnowflakeClient, but
// we'll only warn if the expected driver fails to load, since users may use repackaged or
// custom JDBC drivers for Snowflake communication.View on GitHub (pinned to 86d9c8fc54)
Solutions
- Drop the table in Snowflake (DROP ICEBERG TABLE) outside the Iceberg catalog API
- Guard drop paths with a capability check or feature flag so this catalog is skipped
- Wrap calls in try/catch for UnsupportedOperationException when writing catalog-agnostic code
Example fix
// before
catalog.dropTable(TableIdentifier.of(ns, "tbl"), false);
// after
if (catalog instanceof SnowflakeCatalog) {
// execute DROP ICEBERG TABLE via Snowflake instead
} else {
catalog.dropTable(TableIdentifier.of(ns, "tbl"), false);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (catalog instanceof SnowflakeCatalog) {
// route drop to Snowflake SQL instead of catalog.dropTable
} Type guard
boolean supportsDropTable(Catalog c) {
return !(c instanceof SnowflakeCatalog);
} Try / catch
try {
catalog.dropTable(ident, false);
} catch (UnsupportedOperationException e) {
// perform DROP ICEBERG TABLE via Snowflake
} Prevention
- Treat SnowflakeCatalog as read-only for table lifecycle
- Feature-detect supported operations before dispatching
- Document unsupported operations in catalog wrapper layers
- Route all mutations through Snowflake SQL for this catalog
When it happens
Trigger: Any invocation of catalog.dropTable(identifier, purge) on a catalog initialized as SnowflakeCatalog, directly or via engines/tools that issue DROP TABLE through the catalog.
Common situations: Cleanup jobs that drop stale tables generically across catalogs; Spark 'DROP TABLE' statements routed through SnowflakeCatalog; migration scripts assuming full catalog write support.
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
- SnowflakeCatalog does not currently support renameTable
- SnowflakeCatalog does not currently support createNamespace
- SnowflakeCatalog does not currently support dropNamespace
- Registering tables is not supported
- Registering tables with overwrite is not supported
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/b4aaecfada509556.
Report an issue: GitHub.