{"record":{"id":"082581c29a7fbeb0","repo":"apache/seatunnel","slug":"sink-table-not-exist","errorCode":"SINK_TABLE_NOT_EXIST","errorMessage":"The sink table not exist","messagePattern":"The sink table not exist","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/DefaultSaveModeHandler.java","lineNumber":145,"sourceCode":"        }\n    }\n\n    protected void recreateSchema() {\n        if (tableExists()) {\n            dropTable();\n        }\n        createTable();\n    }\n\n    protected void createSchemaWhenNotExist() {\n        if (!tableExists()) {\n            createTable();\n        }\n    }\n\n    protected void errorWhenSchemaNotExist() {\n        if (!tableExists()) {\n            throw new SeaTunnelRuntimeException(SINK_TABLE_NOT_EXIST, \"The sink table not exist\");\n        }\n    }\n\n    protected void keepSchemaDropData() {\n        if (tableExists() && !isNewTableCreated) {\n            truncateTable();\n        }\n    }\n\n    protected void keepSchemaAndData() {}\n\n    protected void customProcessing() {\n        executeCustomSql();\n    }\n\n    protected void errorWhenDataExists() {\n        if (dataExists()) {\n            throw new SeaTunnelRuntimeException(","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/DefaultSaveModeHandler.java#L127-L163","documentation":"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.","triggerScenarios":"Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/DefaultSaveModeHandler.java:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the target table/schema manually before running the job","Change schema_save_mode to CREATE_SCHEMA_WHEN_NOT_EXIST so SeaTunnel creates it automatically","Fix the table/path/identifier in the sink config if it points at the wrong target"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}