apache/seatunnel · error · ElasticsearchConnectorException

COMMON_UNSUPPORTED_OPERATION

COMMON_UNSUPPORTED_OPERATION

Error message

error fieldName=%s,fieldValue=%s,seaTunnelDataType=%s,rowRecord=%s

What it means

DefaultSeaTunnelRowDeserializer converts Elasticsearch _source JSON fields into SeaTunnelRow fields. Any exception raised while converting a single field is wrapped in ElasticsearchConnectorException (UNSUPPORTED_OPERATION) with context: field name, field value, target SeaTunnel data type, and the full row record serialized as JSON, plus the original cause.

Source

Thrown at seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/serialize/source/DefaultSeaTunnelRowDeserializer.java:136

        SeaTunnelDataType seaTunnelDataType = null;
        try {
            for (int i = 0; i < rowTypeInfo.getTotalFields(); i++) {
                fieldName = rowTypeInfo.getFieldName(i);
                value = recursiveGet(rowRecord.getDoc(), fieldName);
                if (value != null) {
                    seaTunnelDataType = rowTypeInfo.getFieldType(i);
                    if (value instanceof NullNode) {
                        seaTunnelFields[i] = null;
                    } else if (value instanceof TextNode) {
                        seaTunnelFields[i] =
                                convertValue(seaTunnelDataType, ((TextNode) value).textValue());
                    } else {
                        seaTunnelFields[i] = convertValue(seaTunnelDataType, value.toString());
                    }
                }
            }
        } catch (Exception ex) {
            throw new ElasticsearchConnectorException(
                    CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
                    String.format(
                            "error fieldName=%s,fieldValue=%s,seaTunnelDataType=%s,rowRecord=%s",
                            fieldName, value, seaTunnelDataType, JsonUtils.toJsonString(rowRecord)),
                    ex);
        }
        SeaTunnelRow seaTunnelRow = new SeaTunnelRow(seaTunnelFields);
        seaTunnelRow.setTableId(rowRecord.getTableId());
        return seaTunnelRow;
    }

    Object convertValue(SeaTunnelDataType<?> fieldType, String fieldValue)
            throws JsonProcessingException {
        if (STRING_TYPE.equals(fieldType)) {
            return fieldValue;
        } else {
            if (nullDefault.equals(fieldValue)) {
                return null;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Read the wrapped cause ('Caused by') to see the actual conversion failure
  2. Compare the ES document value in the message with the declared seaTunnelDataType and align the SeaTunnel schema with the real ES mapping
  3. Fix or clean the offending document value in Elasticsearch
  4. Use a custom deserializer/converter if the ES field format is nonstandard

Example fix

// before: schema declares price as INT but ES stores "12.5" (string)
// after: align schema or fix data
// schema: price DOUBLE, or fix document to {"price": 12}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    row = deserializer.deserialize(sourceMap, rowType);
} catch (ElasticsearchConnectorException e) {
    log.error("Field conversion failed, inspect fieldName/fieldValue/seaTunnelDataType in message", e);
    throw e;
}

Prevention

When it happens

Trigger: convert(...) catches any Exception from convertValue/parsing while deserializing an ES document field, e.g. a value whose format does not match the declared SeaTunnel type, then wraps and rethrows.

Common situations: Elasticsearch mapping drifted from the declared SeaTunnel schema (e.g. a field became a string while SeaTunnel expects LONG); malformed date or numeric values in _source; null-ish or empty values coerced unexpectedly.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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