{"record":{"id":"ba1617fd2725c82c","repo":"apache/flink","slug":"unknown-type-value-s-the-maxwell-json-messag","errorCode":null,"errorMessage":"Unknown \"type\" value \"%s\". The Maxwell JSON message is '%s'","messagePattern":"Unknown \"type\" value \"(.+?)\"\\. The Maxwell JSON message is '(.+?)'","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/maxwell/MaxwellJsonDeserializationSchema.java","lineNumber":175,"sourceCode":"                    if (before.isNullAt(f) && oldField.findValue(fieldNames.get(f)) == null) {\n                        // not null fields in \"old\" (before) means the fields are changed\n                        // null/empty fields in \"old\" (before) means the fields are not changed\n                        // so we just copy the not changed fields into before\n                        before.setField(f, after.getField(f));\n                    }\n                }\n                before.setRowKind(RowKind.UPDATE_BEFORE);\n                after.setRowKind(RowKind.UPDATE_AFTER);\n                genericRowDataList.add(handleRow(row, before));\n                genericRowDataList.add(handleRow(row, after));\n            } else if (OP_DELETE.equals(type)) {\n                // \"data\" field is a row, contains deleted rows\n                GenericRowData delete = (GenericRowData) row.getRow(0, fieldCount);\n                delete.setRowKind(RowKind.DELETE);\n                genericRowDataList.add(handleRow(row, delete));\n            } else {\n                if (!ignoreParseErrors) {\n                    throw new IOException(\n                            format(\n                                    \"Unknown \\\"type\\\" value \\\"%s\\\". The Maxwell JSON message is '%s'\",\n                                    type, new String(message)));\n                }\n                if (LOG.isDebugEnabled()) {\n                    LOG.debug(\n                            \"Unknown \\\"type\\\" value '{}'. The Maxwell JSON message is '{}'.\",\n                            type,\n                            new String(message));\n                }\n            }\n        } catch (Throwable t) {\n            // a big try catch to protect the processing.\n            if (!ignoreParseErrors) {\n                throw new IOException(\n                        format(\"Corrupt Maxwell JSON message '%s'.\", new String(message)), t);\n            }\n            if (LOG.isDebugEnabled()) {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/maxwell/MaxwellJsonDeserializationSchema.java#L157-L193","documentation":"While parsing a Maxwell JSON message, the 'type' field was not one of 'insert', 'update', or 'delete' (OP_INSERT/OP_UPDATE/OP_DELETE). Because Maxwell messages can also be DDL/transaction/heartbeat events that have no row image, the deserializer refuses unknown types; with 'maxwell-json.ignore-parse-errors' = false (default) it throws IOException, otherwise it logs at debug and skips.","triggerScenarios":"A Maxwell 'bootstrap-insert', DDL, or position/heartbeat message arriving on the topic consumed by a maxwell-json table source; a hand-crafted message with a missing/mistyped 'type'; Maxwell version emitting new event types.","commonSituations":"Consuming a Maxwell topic that also carries DDL or bootstrap events; schema evolution events after ALTER TABLE; test data with a wrong 'type' value.","solutions":["Set 'maxwell-json.ignore-parse-errors' = true on the source table to skip non-row events.","Filter the upstream topic (Maxwell binlog filter / Kafka routing) so only row-change events reach the Flink source.","Verify the message really is Maxwell-format (check the 'type' field values present on the topic with a console consumer)."],"exampleFix":"-- before\n'format' = 'maxwell-json'\n-- after\n'format' = 'maxwell-json',\n'maxwell-json.ignore-parse-errors' = 'true'","handlingStrategy":"try-catch","validationCode":"// Pre-check the type field when tolerating non-row Maxwell events\ncom.fasterxml.jackson.databind.JsonNode n = MAPPER.readTree(message);\nString type = n.path(\"type\").asText(\"\");\nif (!\"insert\".equals(type) && !\"update\".equals(type) && !\"delete\".equals(type)) {\n    return; // skip DDL/heartbeat/bootstrap events\n}","typeGuard":null,"tryCatchPattern":"try { schema.deserialize(message, collector); } catch (IOException e) { if (!ignoreParseErrors) throw e; /* else record and continue */ }","preventionTips":["Set 'maxwell-json.ignore-parse-errors' = true when topics carry DDL/bootstrap events.","Filter Maxwell output upstream so only row events reach the topic."],"tags":["flink","maxwell","json","cdc","parse-error"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}