{"record":{"id":"5b87b89b8df23940","repo":"apache/seatunnel","slug":"unsupported-record-type-5b87b8","errorCode":"UNSUPPORTED_RECORD_TYPE","errorMessage":"Unsupported record type","messagePattern":"Unsupported record type","errorType":"error_code","errorClass":"SensorsDataConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-sensorsdata/src/main/java/org/apache/seatunnel/connectors/sensorsdata/sdk/sink/SensorsDataSDKWriter.java","lineNumber":130,"sourceCode":"                                UserSchemaUtil.buildUnsetUserSchema(userSchema, allProperties);\n                        if (unsetUserSchema != null) {\n                            // do not send profile_unset if all fields are not null\n                            sa.profileUnset(unsetUserSchema);\n                        }\n                    }\n                    break;\n                case USER_EVENT:\n                    sa.track(((UserEventRecord) recordBuilder.build(row)).getUserEventSchema());\n                    break;\n                case USER_DETAIL:\n                    sa.detailSet(\n                            ((UserDetailRecord) recordBuilder.build(row)).getUserDetailSchema());\n                    break;\n                case SPECIAL_ITEM:\n                    sa.itemSet(((SpecialItemRecord) recordBuilder.build(row)).getItemRecord());\n                    break;\n                default:\n                    throw new SensorsDataConnectorException(\n                            SensorsDataConnectorErrorCode.UNSUPPORTED_RECORD_TYPE,\n                            \"Unsupported record type\");\n            }\n        } catch (Exception e) {\n            log.error(\"Write error\", e);\n            log.error(\n                    \"Write error, SeaTunnelRow#tableId={} SeaTunnelRow#kind={} : [{}]\",\n                    row.getTableId(),\n                    row.getRowKind(),\n                    fieldsToString(row));\n            if (!isSkipErrorRecord) {\n                throw new SensorsDataConnectorException(\n                        SensorsDataConnectorErrorCode.SEND_RECORD_FAILED, e.getMessage(), e);\n            }\n        }\n    }\n\n    /** Convert the SeaTunnelRow data to a string */","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-sensorsdata/src/main/java/org/apache/seatunnel/connectors/sensorsdata/sdk/sink/SensorsDataSDKWriter.java#L112-L148","documentation":"SensorsDataSDKWriter.write dispatches each SeaTunnelRow to the SDK method matching the configured record type (USER, USER_EVENT, USER_DETAIL, SPECIAL_ITEM). If recordBuilder.getRecordType() returns anything outside that set, the default branch throws SensorsDataConnectorException with code UNSUPPORTED_RECORD_TYPE. This is a defensive guard — the record type is derived from sink configuration, so hitting it means the config produced an unknown type.","triggerScenarios":"write(row) is called when the record type resolved from the sink config (via SensorsDataRecordBuilder) does not match any of the four supported enum values — i.e. an unrecognized/missing record type setting in the SensorsData sink configuration.","commonSituations":"A typo or unsupported value in the sink config that determines the record type; connector version mismatch where a newer record type was configured but the running connector predates it; internal configuration parsing producing null/unexpected enum values.","solutions":["Check the sink configuration value that selects the record type and correct it to one of USER, USER_EVENT, USER_DETAIL, SPECIAL_ITEM.","Upgrade the connector plugin to a version supporting the record type you configured.","Review SensorsDataRecordBuilder/SensorsDataSDKSinkConfig parsing to see how the record type is derived from config and fix the source value.","Enable debug logging of the resolved record type at writer startup to confirm what was configured."],"exampleFix":"// before: unrecognized record type in config\nrecord_type = \"user_event_v2\" // unsupported\n// after\nrecord_type = \"USER_EVENT\"","handlingStrategy":"validation","validationCode":"Set<String> SUPPORTED = Set.of(\"USER\", \"USER_EVENT\", \"USER_DETAIL\", \"SPECIAL_ITEM\");\nif (!SUPPORTED.contains(configuredRecordType.toUpperCase())) {\n    throw new IllegalArgumentException(\"Unsupported record_type: \" + configuredRecordType);\n}","typeGuard":null,"tryCatchPattern":"try {\n    writer.write(row);\n} catch (SensorsDataConnectorException e) {\n    if (SensorsDataConnectorErrorCode.UNSUPPORTED_RECORD_TYPE.equals(e.getErrorCode())) {\n        log.error(\"Record type not supported: fix sink config record type\");\n        throw e; // configuration error, do not retry\n    }\n}","preventionTips":["Validate the record-type config value at job startup, before processing rows.","Pin connector version to one supporting the configured record type.","Avoid free-text record type values; use documented enum names."],"tags":["sensorsdata","record-type","sink-config"],"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-14T05:17:10.506Z"}