apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-19

COMMON-19

Error message

'<identifier>' unsupported convert SeaTunnel data type '<dataType>' of '<field>' to connector data type.

What it means

AmazonDynamoDB connector's DefaultSeaTunnelRowSerializer.convertType() maps a SeaTunnel SQL type to the corresponding DynamoDB AttributeValue type (S, N, B, M, L, etc.). When the field's SeaTunnel type has no mapping in the switch statement, it throws CommonError.convertToConnectorTypeError (COMMON-19). This means the serializer cannot represent that SeaTunnel type as a DynamoDB attribute, so the row cannot be written.

Solutions

  1. Change the SeaTunnelRowType schema to only use supported types (STRING, INT, BIGINT, DOUBLE, BOOLEAN, BYTES, MAP, ARRAY) for the DynamoDB sink.
  2. Add a converter/transform (e.g. CAST or field filter) upstream to drop or convert the unsupported field before the sink.
  3. Extend DefaultSeaTunnelRowSerializer.convertType()/convertItem() with a mapping for the missing SqlType if the type genuinely maps to a DynamoDB attribute type.
  4. Check the connector version's supported-type list in docs and align the catalog schema accordingly.

Example fix

// before
SeaTunnelRowType rowType = new SeaTunnelRowType(
    new String[]{"id", "created"},
    new SeaTunnelDataType[]{BasicType.STRING_TYPE, LocalTimeType.LOCAL_TIME_TYPE});

// after (convert TIME to STRING upstream)
SeaTunnelRowType rowType = new SeaTunnelRowType(
    new String[]{"id", "created"},
    new SeaTunnelDataType[]{BasicType.STRING_TYPE, BasicType.STRING_TYPE});
Defensive patterns

Strategy: validation

Validate before calling

java
Set<SqlType> supported = EnumSet.of(SqlType.STRING, SqlType.INT, SqlType.BIGINT, SqlType.DOUBLE, SqlType.BOOLEAN, SqlType.BYTES, SqlType.MAP, SqlType.ARRAY);
for (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {
    if (!supported.contains(t.getSqlType())) {
        throw new IllegalArgumentException("Unsupported type for DynamoDB sink: " + t.getSqlType());
    }
}

Type guard

java
boolean isSupported(SeaTunnelDataType<?> t) {
    switch (t.getSqlType()) {
        case STRING: case INT: case BIGINT: case DOUBLE:
        case BOOLEAN: case BYTES: case MAP: case ARRAY:
            return true;
        default:
            return false;
    }
}

Prevention

When it happens

Trigger: Writing a SeaTunnelRow to DynamoDB whose SeaTunnelRowType contains a field with a SqlType not handled by convertType()'s switch (e.g. MAP/ARRAY variants beyond the mapped ones, or types like DATE, TIME, NULL, ROW depending on connector version). Triggered via serialize() -> convertTypes() -> convertType().

Common situations: Using a source table with columns typed as ROW/struct or other nested types and sinking to DynamoDB; schema drift after upstream adds a new column type; hardcoding a catalog schema that includes unsupported types like FLOAT or a newly added SeaTunnel type.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-amazondynamodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/amazondynamodb/serialize/DefaultSeaTunnelRowSerializer.java:108

            case DECIMAL:
                return AttributeValue.Type.N;
            case STRING:
            case DATE:
            case TIME:
            case TIMESTAMP:
                return AttributeValue.Type.S;
            case BOOLEAN:
                return AttributeValue.Type.BOOL;
            case NULL:
                return AttributeValue.Type.NUL;
            case BYTES:
                return AttributeValue.Type.B;
            case MAP:
                return AttributeValue.Type.M;
            case ARRAY:
                return AttributeValue.Type.L;
            default:
                throw CommonError.convertToConnectorTypeError(
                        "AmazonDynamoDB", seaTunnelDataType.getSqlType().toString(), field);
        }
    }

    private AttributeValue convertItem(
            String field,
            Object value,
            SeaTunnelDataType seaTunnelDataType,
            AttributeValue.Type measurementsType) {
        if (value == null) {
            return AttributeValue.builder().nul(true).build();
        }
        switch (measurementsType) {
            case N:
                return AttributeValue.builder()
                        .n(Integer.toString(((Number) value).intValue()))
                        .build();
            case S:

View on GitHub (pinned to cf67b549a7)