apache/seatunnel · error · TableNotExistException

Table not exist

Error message

Table not exist

What it means

IcebergCatalog.getTable loads the Iceberg table and converts it to a SeaTunnel CatalogTable; when the underlying catalog throws NoSuchTableException, it is translated into SeaTunnel's TableNotExistException with message 'Table not exist', preserving the tablePath and cause.

Source

Thrown at seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/catalog/IcebergCatalog.java:172

        return tables;
    }

    @Override
    public boolean tableExists(TablePath tablePath) throws CatalogException {
        return catalog.tableExists(toIcebergTableIdentifier(tablePath));
    }

    @Override
    public CatalogTable getTable(TablePath tablePath)
            throws CatalogException, TableNotExistException {
        TableIdentifier icebergTableIdentifier = toIcebergTableIdentifier(tablePath);
        try {
            CatalogTable catalogTable =
                    toCatalogTable(catalog.loadTable(icebergTableIdentifier), tablePath);
            log.info("Fetched table details for: {}", tablePath);
            return catalogTable;
        } catch (NoSuchTableException e) {
            throw new TableNotExistException("Table not exist", tablePath, e);
        }
    }

    @Override
    public void createTable(TablePath tablePath, CatalogTable table, boolean ignoreIfExists)
            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {
        log.info("Creating table at path: {}", tablePath);
        SchemaUtils.autoCreateTable(catalog, tablePath, table, readonlyConfig);
    }

    @Override
    public void dropTable(TablePath tablePath, boolean ignoreIfNotExists)
            throws TableNotExistException, CatalogException {
        if (ignoreIfNotExists) {
            if (!tableExists(tablePath)) {
                log.info(
                        "Attempted to drop table at path: {}. The table does not exist, but proceeding as 'ignoreIfNotExists' is set to true.",
                        tablePath);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Verify the tablePath (namespace + table) matches an existing table: list via the Iceberg catalog or engine client
  2. Check the catalog warehouse/URI config points at the environment where the table actually lives
  3. Create the table first if the job assumed it pre-exists (createTable or engine DDL)
  4. Watch identifier case sensitivity — match the exact case used at creation

Example fix

// before: table = "Evets" (typo) in namespace "db"
read { table_path = "db.Evets" }
// after
read { table_path = "db.events" }
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check existence before getTable
if (!seaTunnelCatalog.tableExists(TablePath.of("db", "events"))) {
  throw new IllegalStateException("Table db.events does not exist in the configured catalog");
}

Try / catch

try {
  CatalogTable t = seaTunnelCatalog.getTable(TablePath.of("db", "events"));
} catch (TableNotExistException e) {
  // verify tablePath / create table / correct warehouse config, then retry
}

Prevention

When it happens

Trigger: getTable(tablePath) is called for a fully qualified path whose table does not exist in the Iceberg catalog (wrong table name, wrong namespace, table dropped, or catalog pointing to a different warehouse/location).

Common situations: Typo in table name/namespace in the job config; reading a table that was dropped or renamed; environment mismatch (dev warehouse path vs prod); namespace case mismatch on catalogs that treat identifiers case-sensitively.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/c61700eeeccde88f. Report an issue: GitHub.