apache/seatunnel · error · SeaTunnelRuntimeException

SINK_TABLE_NOT_EXIST

SINK_TABLE_NOT_EXIST

Error message

The sink table not exist

What it means

DefaultSaveModeHandler.errorWhenSchemaNotExist executed because the sink was configured with schema_save_mode = ERROR_WHEN_SCHEMA_NOT_EXIST and the target table does not exist (catalog.tableExists(...) returned false). The error code is SINK_TABLE_NOT_EXIST; the literal text is intentionally generic and the configured save mode is what turned the missing table into a hard failure.

Solutions

  1. Create the target table/schema manually before running the job
  2. Change schema_save_mode to CREATE_SCHEMA_WHEN_NOT_EXIST so SeaTunnel creates it automatically
  3. Fix the table/path/identifier in the sink config if it points at the wrong target
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/DefaultSaveModeHandler.java:145 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/DefaultSaveModeHandler.java:145

        }
    }

    protected void recreateSchema() {
        if (tableExists()) {
            dropTable();
        }
        createTable();
    }

    protected void createSchemaWhenNotExist() {
        if (!tableExists()) {
            createTable();
        }
    }

    protected void errorWhenSchemaNotExist() {
        if (!tableExists()) {
            throw new SeaTunnelRuntimeException(SINK_TABLE_NOT_EXIST, "The sink table not exist");
        }
    }

    protected void keepSchemaDropData() {
        if (tableExists() && !isNewTableCreated) {
            truncateTable();
        }
    }

    protected void keepSchemaAndData() {}

    protected void customProcessing() {
        executeCustomSql();
    }

    protected void errorWhenDataExists() {
        if (dataExists()) {
            throw new SeaTunnelRuntimeException(

View on GitHub (pinned to cf67b549a7)