apache/seatunnel · error · SensorsDataConnectorException

UNSUPPORTED_RECORD_TYPE

UNSUPPORTED_RECORD_TYPE

Error message

Unsupported record type

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-sensorsdata/src/main/java/org/apache/seatunnel/connectors/sensorsdata/sdk/sink/SensorsDataSDKWriter.java:130

                                UserSchemaUtil.buildUnsetUserSchema(userSchema, allProperties);
                        if (unsetUserSchema != null) {
                            // do not send profile_unset if all fields are not null
                            sa.profileUnset(unsetUserSchema);
                        }
                    }
                    break;
                case USER_EVENT:
                    sa.track(((UserEventRecord) recordBuilder.build(row)).getUserEventSchema());
                    break;
                case USER_DETAIL:
                    sa.detailSet(
                            ((UserDetailRecord) recordBuilder.build(row)).getUserDetailSchema());
                    break;
                case SPECIAL_ITEM:
                    sa.itemSet(((SpecialItemRecord) recordBuilder.build(row)).getItemRecord());
                    break;
                default:
                    throw new SensorsDataConnectorException(
                            SensorsDataConnectorErrorCode.UNSUPPORTED_RECORD_TYPE,
                            "Unsupported record type");
            }
        } catch (Exception e) {
            log.error("Write error", e);
            log.error(
                    "Write error, SeaTunnelRow#tableId={} SeaTunnelRow#kind={} : [{}]",
                    row.getTableId(),
                    row.getRowKind(),
                    fieldsToString(row));
            if (!isSkipErrorRecord) {
                throw new SensorsDataConnectorException(
                        SensorsDataConnectorErrorCode.SEND_RECORD_FAILED, e.getMessage(), e);
            }
        }
    }

    /** Convert the SeaTunnelRow data to a string */

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check the sink configuration value that selects the record type and correct it to one of USER, USER_EVENT, USER_DETAIL, SPECIAL_ITEM.
  2. Upgrade the connector plugin to a version supporting the record type you configured.
  3. Review SensorsDataRecordBuilder/SensorsDataSDKSinkConfig parsing to see how the record type is derived from config and fix the source value.
  4. Enable debug logging of the resolved record type at writer startup to confirm what was configured.

Example fix

// before: unrecognized record type in config
record_type = "user_event_v2" // unsupported
// after
record_type = "USER_EVENT"
Defensive patterns

Strategy: validation

Validate before calling

Set<String> SUPPORTED = Set.of("USER", "USER_EVENT", "USER_DETAIL", "SPECIAL_ITEM");
if (!SUPPORTED.contains(configuredRecordType.toUpperCase())) {
    throw new IllegalArgumentException("Unsupported record_type: " + configuredRecordType);
}

Try / catch

try {
    writer.write(row);
} catch (SensorsDataConnectorException e) {
    if (SensorsDataConnectorErrorCode.UNSUPPORTED_RECORD_TYPE.equals(e.getErrorCode())) {
        log.error("Record type not supported: fix sink config record type");
        throw e; // configuration error, do not retry
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/5b87b89b8df23940. Report an issue: GitHub.