apache/iceberg · warning
Table does not have a UUID, this may cause issues with…
Error message
Table {} does not have a UUID, this may cause issues with commit coordination on table replace What it means
IcebergWriterFactory.createWriter logs a warning when table.uuid() returns null, meaning the catalog could not supply a stable table UUID. The UUID is used to build a TableReference that lets Kafka Connect's commit coordination detect when a table was replaced/renamed between writes; without it, a table replace can go undetected and commits may target the wrong table metadata.
Solutions
- Upgrade the catalog implementation/Iceberg version so TableMetadata carries a UUID
- Check why table.uuid() is null for your catalog — ensure the catalog returns real TableMetadata, not a wrapped/stubbed Table
- If the warning is benign (commits never span table replaces), suppress or ignore it and monitor for misdirected commits
- Set the table's uuid explicitly by rewriting table metadata with the current Iceberg core writer
Example fix
// before Table table = customCatalog.loadTable(identifier); return new IcebergWriter(table, TableReference.of(catalog.name(), identifier, table.uuid()), config); // after // use a catalog that supplies uuid, e.g. HiveCatalog/HadoopCatalog upgraded to a version that populates TableMetadata.uuid
Defensive patterns
Strategy: validation
Validate before calling
if (table.uuid() == null) { LOG.warn("table {} has no uuid; commit coordination on replace will be unreliable", identifier); } Type guard
boolean hasUuid(Table t) { return t.uuid() != null; } Prevention
- Use catalogs that populate TableMetadata.uuid
- Pin a recent Iceberg version on both writer and catalog
- Log/monitor TableReference uuid presence in production
When it happens
Trigger: Instantiating an IcebergWriter via createWriter against a catalog whose Table implementation does not expose a UUID (e.g. custom or older catalog implementations, or tables resolved through wrappers that drop the uuid field).
Common situations: Using a custom Catalog implementation that does not set the uuid in its TableMetadata; serializing/deserializing Table objects that lose the uuid; older Iceberg catalog builds where uuid was optional.
Related errors
- An error occurred closing catalog instance, ignoring...
- Cannot convert to UUID
- Commit failed for task ( consecutive failures, will retry)
- Table not found, skipping commit
- Altering a view is not supported by catalog:
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/437c4d29ccabff54.
Report an issue: GitHub.
Appendix: source
Thrown at kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/IcebergWriterFactory.java:74
RecordWriter createWriter(String tableName, SinkRecord sample, boolean ignoreMissingTable) {
TableIdentifier identifier = TableIdentifier.parse(tableName);
Table table;
try {
table = catalog.loadTable(identifier);
} catch (NoSuchTableException nst) {
if (config.autoCreateEnabled()) {
table = autoCreateTable(tableName, sample);
} else if (ignoreMissingTable) {
return new NoOpWriter();
} else {
throw nst;
}
}
UUID tableUuid = table.uuid();
if (tableUuid == null) {
LOG.warn(
"Table {} does not have a UUID, this may cause issues with commit coordination on table replace",
identifier);
}
TableReference tableReference = TableReference.of(catalog.name(), identifier, tableUuid);
return new IcebergWriter(table, tableReference, config);
}
@VisibleForTesting
Table autoCreateTable(String tableName, SinkRecord sample) {
StructType structType;
if (sample.valueSchema() == null) {
Type type = SchemaUtils.inferIcebergType(sample.value(), config);
if (type == null) {
throw new DataException("Unable to create table from empty object");
}
structType = type.asStructType();
} else {View on GitHub (pinned to 86d9c8fc54)