apache/seatunnel · error · TaskExecuteException

All candidate sink tables were skipped in Spark starter.

Error message

All candidate sink tables were skipped in Spark starter.

What it means

SinkExecuteProcessor.execute iterates candidate sink tables, injecting Spark writes; if some tables were skipped (unsupported save mode, inaccessible target, etc.) and none were actually written, it throws a TaskExecuteException with a MultiTableFailureHelper summary of the skipped tables.

Source

Thrown at seatunnel-core/seatunnel-spark-starter/seatunnel-spark-2-starter/src/main/java/org/apache/seatunnel/core/starter/spark/execution/SinkExecuteProcessor.java:203

                            MultiTableFailureHelper.withFailedTables(
                                    MultiTableFailureHelper.mergeOptions(
                                            ReadonlyConfig.fromConfig(sinkConfig),
                                            ReadonlyConfig.fromConfig(
                                                    sparkRuntimeEnvironment.getConfig())),
                                    currentSkippedTables),
                            classLoader);
            createdAnySink = true;
            String applicationId =
                    sparkRuntimeEnvironment.getSparkSession().sparkContext().applicationId();
            CatalogTable[] catalogTables =
                    datasetTableInfo.getCatalogTables().toArray(new CatalogTable[0]);
            SparkSinkInjector.inject(
                            dataset.write(), sink, catalogTables, applicationId, parallelism)
                    .option("checkpointLocation", "/tmp")
                    .save();
        }
        if (!createdAnySink && !skippedTables.isEmpty()) {
            throw new TaskExecuteException(
                    MultiTableFailureHelper.formatFailedTableSummary(
                            "All candidate sink tables were skipped in Spark starter.",
                            skippedTables));
        }
        if (createdAnySink && !skippedTables.isEmpty()) {
            log.warn(
                    MultiTableFailureHelper.formatFailedTableSummary(
                            "Some sink tables were skipped in Spark starter.", skippedTables));
        }
        // the sink is the last stream
        return null;
    }

    public void handleSaveMode(SeaTunnelSink sink) {
        if (sink instanceof SupportSaveMode) {
            Optional<SaveModeHandler> saveModeHandler =
                    ((SupportSaveMode) sink).getSaveModeHandler();
            if (saveModeHandler.isPresent()) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Review the skippedTables summary in the exception for per-table reasons
  2. Adjust schema_save_mode/data_save_mode so target tables are written rather than skipped
  3. Verify credentials and permissions on the target catalog/database
  4. Check plugin_input routing/filtering so at least one table is actually matched

Example fix

// before
sink {
  Jdbc {
    schema_save_mode = "IGNORE"
    data_save_mode = "IGNORE"
  }
}
// after
sink {
  Jdbc {
    schema_save_mode = "CREATE_SCHEMA_WHEN_NOT_EXIST"
    data_save_mode = "APPEND_DATA"
  }
}
Defensive patterns

Strategy: validation

Validate before calling

if (skippedTables.size() == candidateTables.size()) {
    throw new IllegalStateException("All sink tables would be skipped; check save-mode and routing config");
}

Try / catch

try {
    sinkProcessor.execute();
} catch (TaskExecuteException e) {
    log.error("Skipped tables summary: {}", e.getMessage());
}

Prevention

When it happens

Trigger: All target tables in a multi-table sink run were skipped instead of written — e.g. auto-create/save-mode rules excluded every table, or the sink connector could not handle any of the catalog tables.

Common situations: Save mode options (schema_save_mode/data_save_mode) set to values that skip existing tables; target database/table permissions missing; multi-table jobs where table name routing filters exclude everything.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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