apache/iceberg · warning · UnsupportedOperationException
SnowflakeCatalog does not currently support renameTable
Error message
SnowflakeCatalog does not currently support renameTable
What it means
Unconditional capability guard in SnowflakeCatalog.renameTable: tables live in Snowflake and renaming through this catalog is not implemented, so every call is rejected before contacting Snowflake. Use Snowflake-native DDL or recreate the table under the new identifier instead.
Source
Thrown at snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java:101
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.
Class.forName(JdbcSnowflakeClient.EXPECTED_JDBC_IMPL);
} catch (ClassNotFoundException cnfe) {
LOG.warn(
"Failed to load expected JDBC SnowflakeDriver - if queries fail by failing"
+ " to find a suitable driver for jdbc:snowflake:// URIs, you must add the Snowflake "
+ " JDBC driver to your jars/packages",View on GitHub (pinned to 86d9c8fc54)
Solutions
- Perform the rename in Snowflake (ALTER ICEBERG TABLE ... RENAME TO) outside the catalog API
- Skip rename operations for SnowflakeCatalog in generic tooling
- Catch UnsupportedOperationException and fall back to a Snowflake-side rename
Example fix
// before
catalog.renameTable(from, to);
// after
try {
catalog.renameTable(from, to);
} catch (UnsupportedOperationException e) {
// perform rename via Snowflake SQL instead
} Defensive patterns
Strategy: try-catch
Validate before calling
if (catalog instanceof SnowflakeCatalog) {
// perform rename in Snowflake instead
} Type guard
boolean supportsRenameTable(Catalog c) {
return !(c instanceof SnowflakeCatalog);
} Try / catch
try {
catalog.renameTable(from, to);
} catch (UnsupportedOperationException e) {
// ALTER ICEBERG TABLE ... RENAME TO via Snowflake
} Prevention
- Avoid rename workflows against SnowflakeCatalog
- Centralize rename logic with per-catalog capability flags
- Catch UnsupportedOperationException at the tool boundary
- Prefer create+copy+verify over rename when Snowflake-side rename is unavailable
When it happens
Trigger: Any invocation of catalog.renameTable(from, to) on SnowflakeCatalog, including Spark ALTER TABLE ... RENAME TO routed through the catalog.
Common situations: Generic table-management tooling that renames tables across catalogs; scripted migrations renaming tables; engines issuing RENAME operations against a SnowflakeCatalog.
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 dropTable
- 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/806016c815aa52a6.
Report an issue: GitHub.