apache/seatunnel · error · CatalogException
Failed to create empty dataset at
Error message
Failed to create empty dataset at
What it means
LanceCatalog.createTable, when creating an empty dataset, wraps any exception from the dataset-creation flow (Arrow schema serialization, allocator usage, dataset write) into a CatalogException 'Failed to create empty dataset at <path>'. It indicates the empty Lance dataset could not be materialized at the target path.
Source
Thrown at seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/catalog/LanceCatalog.java:296
}
Schema schemaWithMetadata = new Schema(arrowSchema.getFields(), metadata);
org.apache.arrow.memory.BufferAllocator allocator =
new org.apache.arrow.memory.RootAllocator();
try {
com.lancedb.lance.WriteParams writeParams =
new com.lancedb.lance.WriteParams.Builder().build();
com.lancedb.lance.Dataset.create(
allocator, datasetPath, schemaWithMetadata, writeParams);
log.debug("Created empty dataset at {}", datasetPath);
} finally {
allocator.close();
}
}
}
} catch (Exception e) {
throw new CatalogException("Failed to create empty dataset at " + datasetPath, e);
}
}
}
@Override
public void dropTable(TablePath tablePath, boolean ignoreIfNotExists)
throws TableNotExistException, CatalogException {
DropTableRequest request = new DropTableRequest();
List<String> ids = Lists.newArrayList(tablePath.getTableName());
request.setId(ids);
try {
namespace.dropTable(request);
} catch (Exception e) {
String errorMsg = e.getMessage();
if (errorMsg != null
&& (errorMsg.contains("Table does not exist")
|| errorMsg.contains("TABLE_NOT_FOUND")
|| errorMsg.contains("404")View on GitHub (pinned to cf67b549a7)
Solutions
- Check the cause exception for the underlying storage or schema error
- Verify the warehouse/dataset path is writable and credentials are correct
- Validate the CatalogTable schema is compatible with Lance types before creating
- Ensure the target path does not contain a conflicting partial dataset from a previous failed create
Defensive patterns
Strategy: try-catch
Validate before calling
Path p = Paths.get(datasetPath);
if (Files.exists(p) && !Files.isWritable(p)) {
throw new IllegalStateException("Dataset path not writable: " + datasetPath);
} Try / catch
try {
lanceCatalog.createTable(tablePath, catalogTable, false);
} catch (CatalogException e) {
// inspect cause: storage access, schema validity, or partial dataset
} When it happens
Trigger: createTable is invoked with an empty initial schema (ignoreIfExists false) and the underlying write to datasetPath throws — e.g. storage failure, invalid schema, or allocator/deserializer errors.
Common situations: Warehouse path not writable or doesn't exist and cannot be created; object storage misconfigured (bad endpoint/credentials); schema passed to createTable is invalid for Lance; disk full.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- Table schema is null or empty. DescribeTable returned:
- Failed to get table:
- Failed to drop table:
- Preview action is not supported
- Can not find catalog table with factoryId [%s]
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/e5fc42a14e82d446.
Report an issue: GitHub.