{"record":{"id":"0d3c651cc4f49ff4","repo":"apache/seatunnel","slug":"oracle-insert-mode-append-values-does-not-support","errorCode":null,"errorMessage":"oracle_insert_mode=APPEND_VALUES does not support copy statement.","messagePattern":"oracle_insert_mode=APPEND_VALUES does not support copy statement\\.","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkFactory.java","lineNumber":416,"sourceCode":"     * primary keys may be derived from the upstream {@code CatalogTable} at factory time (inside\n     * {@link #createSink}), which happens after OptionRule validation. That case is guarded at\n     * runtime by {@code JdbcOutputFormatBuilder.validateOracleInsertMode}.\n     */\n    static class OracleAppendValuesValidator\n            implements ConditionExtension<JdbcSinkConfig.OracleInsertMode> {\n        @Override\n        public String description() {\n            return \"oracle_insert_mode=APPEND_VALUES conflicts with certain options\";\n        }\n\n        @Override\n        public boolean evaluate(ReadonlyConfig config, JdbcSinkConfig.OracleInsertMode value)\n                throws OptionValidationException {\n            if (value != JdbcSinkConfig.OracleInsertMode.APPEND_VALUES) {\n                return true;\n            }\n            if (config.get(JdbcSinkOptions.USE_COPY_STATEMENT)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support copy statement.\");\n            }\n            if (config.get(JdbcSinkOptions.IS_EXACTLY_ONCE)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support exactly-once.\");\n            }\n            if (!config.get(JdbcSinkOptions.AUTO_COMMIT)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES requires auto_commit=true.\");\n            }\n            if (!config.get(JdbcSinkOptions.GENERATE_SINK_SQL)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support custom query.\");\n            }\n            if (config.get(JdbcSinkOptions.SUPPORT_UPSERT_BY_INSERT_ONLY)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support insert-only upsert.\");\n            }","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkFactory.java#L398-L434","documentation":"This OptionValidationException is thrown by JdbcSinkFactory's Oracle insert-mode validator when oracle_insert_mode=APPEND_VALUES is combined with use_copy_statement=true. APPEND_VALUES hint-based inserts and the COPY statement are mutually exclusive write paths for the Oracle connector.","triggerScenarios":"Configuring sink options oracle_insert_mode=\"append_values\" together with use_copy_statement=true; the validator's evaluate() method rejects the combination during option validation.","commonSituations":"Enabling Oracle COPY-based bulk load while also (explicitly or via copied template config) setting append_values insert mode; incremental config edits that left both options set.","solutions":["Set use_copy_statement=false, or","Change oracle_insert_mode to a mode compatible with COPY (remove the append_values setting)","Review the sink config template for leftover conflicting options"],"exampleFix":"// before\noracle_insert_mode = \"append_values\"\nuse_copy_statement = true\n// after\noracle_insert_mode = \"append_values\"\nuse_copy_statement = false","handlingStrategy":"validation","validationCode":"if (\"append_values\".equalsIgnoreCase(config.get(\"oracle_insert_mode\"))\n    && Boolean.parseBoolean(String.valueOf(config.get(\"use_copy_statement\")))) {\n  throw new IllegalArgumentException(\"use_copy_statement must be false with append_values\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  validateSinkOptions(config);\n} catch (OptionValidationException e) {\n  // fix conflicting options before job submission\n}","preventionTips":["Never combine use_copy_statement=true with append_values mode","Review merged config output before submission","Keep sink config templates free of stale options"],"tags":["jdbc","oracle","config-conflict","validation"],"backgroundTag":"conflicting-config-options","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"}