{"record":{"id":"2379ed47c3aefca3","repo":"apache/seatunnel","slug":"unknown-operation-type-s","errorCode":null,"errorMessage":"Unknown operation type '%s'.","messagePattern":"Unknown operation type '(.+?)'\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/ogg/OggJsonDeserializationSchema.java","lineNumber":231,"sourceCode":"                                String.format(REPLICA_IDENTITY_EXCEPTION, \"DELETE\"));\n                    }\n                    // Gets the data for the DELETE BEFORE operation\n                    SeaTunnelRow beforeDelete = convertJsonNode(dataBeforeDel);\n                    if (beforeDelete == null) {\n                        throw new IllegalStateException(\n                                String.format(REPLICA_IDENTITY_EXCEPTION, \"DELETE\"));\n                    }\n                    beforeDelete.setRowKind(RowKind.DELETE);\n                    if (tablePath != null) {\n                        beforeDelete.setTableId(tablePath.toString());\n                    }\n                    if (tsNode != null) {\n                        MetadataUtil.setEventTime(beforeDelete, ts);\n                    }\n                    out.collect(beforeDelete);\n                    break;\n                default:\n                    throw new IllegalStateException(\n                            String.format(\"Unknown operation type '%s'.\", op));\n            }\n\n        } catch (RuntimeException e) {\n            if (!ignoreParseErrors) {\n                throw CommonError.jsonOperationError(FORMAT, jsonNode.toString(), e);\n            }\n        }\n    }\n\n    private ObjectNode convertBytes(byte[] message) throws SeaTunnelRuntimeException {\n        try {\n            return (ObjectNode) jsonDeserializer.deserializeToJsonNode(message);\n        } catch (Throwable t) {\n            throw CommonError.jsonOperationError(FORMAT, new String(message), t);\n        }\n    }\n","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/ogg/OggJsonDeserializationSchema.java#L213-L249","documentation":"Thrown by OggJsonDeserializationSchema.deserializeMessage when an Oracle GoldenGate JSON message carries an operation type ('op') that is not one of the supported values (I=insert, U=update, D=delete). The schema switches on the op field and the default branch rejects anything else. If ignoreParseErrors is false, the resulting RuntimeException is wrapped by CommonError.jsonOperationError.","triggerScenarios":"Deserializing an OGG JSON message whose 'op' field is missing, empty, or set to an unexpected value (e.g. 'R' for truncate, 'T', lowercase 'i', or a custom replication op). Occurs inside deserialize -> deserializeMessage during source record processing.","commonSituations":"OGG trail/replicat configured with message types the connector does not model; upstream tool emitting non-standard JSON; op field renamed or dropped by an intermediate Kafka topic transformation; case mismatch writing lowercase op values.","solutions":["Inspect the failing message (printed in the wrapped jsonOperationError) and check its 'op' field value against supported I/U/D values","Fix the upstream OGG/Replicat configuration so it emits only insert/update/delete operations","Filter or route unknown-op messages to a dead-letter topic before feeding this connector","If the op values are legitimately parse errors, set format.ignore-parse-errors=true so bad records are skipped instead of failing the job"],"exampleFix":"// before (HOCON job config)\nformat = ogg-json\n// messages with unknown ops fail the job\n\n// after\nformat = ogg-json\nformat.ignore-parse-errors = true","handlingStrategy":"validation","validationCode":"String op = jsonNode.path(\"op\").asText(\"\");\nif (!op.equals(\"I\") && !op.equals(\"U\") && !op.equals(\"D\")) {\n    // route to dead-letter / skip before feeding the connector\n}","typeGuard":"boolean isSupportedOggOp(String op) {\n    return \"I\".equals(op) || \"U\".equals(op) || \"D\".equals(op);\n}","tryCatchPattern":"try {\n    deserialize(message, out);\n} catch (RuntimeException e) {\n    log.warn(\"Skipping unparseable ogg-json record: {}\", message, e);\n    // dead-letter or drop the record\n}","preventionTips":["Set format.ignore-parse-errors=true when occasional bad records are acceptable","Validate upstream OGG replicat config emits only I/U/D ops","Inspect sample Kafka messages for the topic before enabling the connector","Route malformed CDC events to a dead-letter topic for later triage"],"tags":["json","deserialization","ogg","cdc"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}