apache/seatunnel · error · RuntimeException

SeaTunnel avro format is not supported for this data type [%

Error message

SeaTunnel avro format is not supported for this data type [%s]

What it means

Thrown by ProtobufToRowConverter.convertField as a plain RuntimeException when a protobuf DynamicMessage field maps to a SeaTunnel data type the conversion path cannot handle. Only explicitly handled SQL types (primitives, STRING, BYTES, arrays, maps, rows, temporals) are converted; anything else falls to the default branch. Note the message text says 'avro' even though this is the protobuf converter — a copy-paste quirk in the source.

Source

Thrown at seatunnel-formats/seatunnel-format-protobuf/src/main/java/org/apache/seatunnel/format/protobuf/ProtobufToRowConverter.java:162

                return res;
            case ROW:
                Descriptors.Descriptor nestedTypeByName =
                        descriptor.findNestedTypeByName(fieldName);
                DynamicMessage s =
                        (DynamicMessage)
                                dynamicMessage.getField(
                                        descriptor.findFieldByName(fieldName.toLowerCase()));
                return converter(nestedTypeByName, s, (SeaTunnelRowType) dataType);
            case ARRAY:
                SeaTunnelDataType<?> basicType = ((ArrayType<?, ?>) dataType).getElementType();
                List<Object> list = (List<Object>) val;
                return convertArray(list, basicType);
            default:
                String errorMsg =
                        String.format(
                                "SeaTunnel avro format is not supported for this data type [%s]",
                                dataType.getSqlType());
                throw new RuntimeException(errorMsg);
        }
    }

    private Object getFieldValue(DynamicMessage dm, String fieldName) {
        return dm.getAllFields().entrySet().stream()
                .filter(entry -> entry.getKey().getName().equals(fieldName))
                .map(Map.Entry::getValue)
                .findFirst()
                .orElse(null);
    }

    protected Object convertArray(List<Object> val, SeaTunnelDataType<?> dataType) {
        if (val == null) {
            return null;
        }
        int length = val.size();
        Object instance = Array.newInstance(dataType.getTypeClass(), length);
        for (int i = 0; i < val.size(); i++) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check the catalog/schema mapping for the offending field and change it to a supported type (primitives, STRING, BYTES, ARRAY, MAP, ROW, temporal types)
  2. Regenerate/adjust the proto schema so the field maps to a supported protobuf/SeaTunnel type
  3. Upgrade SeaTunnel — newer releases often extend the supported type set; file an issue if a needed type is missing

Example fix

// before (catalog table)
field_price = FLOAT_128   // unsupported high-precision type

// after
field_price = DOUBLE      // or another supported numeric type
Defensive patterns

Strategy: validation

Validate before calling

Set<SqlType> supported = Set.of(SqlType.STRING, SqlType.BOOLEAN, SqlType.INT, SqlType.BIGINT,
    SqlType.FLOAT, SqlType.DOUBLE, SqlType.DATE, SqlType.TIME, SqlType.TIMESTAMP,
    SqlType.BYTES, SqlType.ARRAY, SqlType.MAP, SqlType.ROW);
if (!supported.contains(dataType.getSqlType())) {
    throw new IllegalArgumentException("Unsupported proto->row type: " + dataType.getSqlType());
}

Type guard

boolean isProtoConvertible(SeaTunnelDataType<?> t) {
    switch (t.getSqlType()) {
        case STRING: case BOOLEAN: case INT: case BIGINT: case FLOAT: case DOUBLE:
        case BYTES: case DATE: case TIME: case TIMESTAMP:
        case ARRAY: case MAP: case ROW:
            return true;
        default:
            return false;
    }
}

Try / catch

try {
    SeaTunnelRow row = converter.convert(dynamicMessage);
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().contains("not supported for this data type")) {
        throw new IllegalStateException("Fix schema mapping; unsupported type", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: convertField encountering a SeaTunnel SqlType outside the handled set (e.g. NULL or unrecognized/extension types) while converting protobuf DynamicMessage data to a SeaTunnelRow; recursion via converter/convertArray reaching an unhandled nested type.

Common situations: Schema/catalog declaring a column type the protobuf converter does not implement; proto schema evolution introducing field kinds not anticipated; misconfigured catalog table mapping proto fields to exotic SeaTunnel types.

Related errors


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