apache/seatunnel · error · SelectDBConnectorException

UNSUPPORTED_DATA_TYPE

UNSUPPORTED_DATA_TYPE

Error message

dataType + " is not supported 

What it means

Thrown by SeaTunnelRowConverter.convert (selectdb-cloud connector) when a SeaTunnelRow field has a SeaTunnelDataType not handled by the switch (e.g. complex types beyond ARRAY/MAP or unsupported primitives). It names the unsupported dataType in the message.

Source

Thrown at seatunnel-connectors-v2/connector-selectdb-cloud/src/main/java/org/apache/seatunnel/connectors/selectdb/serialize/SeaTunnelRowConverter.java:70

            case FLOAT:
            case DOUBLE:
            case DECIMAL:
            case BOOLEAN:
            case STRING:
                return val;
            case DATE:
                return DateUtils.toString((LocalDate) val, dateFormatter);
            case TIME:
                return TimeUtils.toString((LocalTime) val, timeFormatter);
            case TIMESTAMP:
                return DateTimeUtils.toString((LocalDateTime) val, dateTimeFormatter);
            case ARRAY:
            case MAP:
                return JsonUtils.toJsonString(val);
            case BYTES:
                return new String((byte[]) val);
            default:
                throw new SelectDBConnectorException(
                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
                        dataType + " is not supported ");
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Flatten or cast unsupported columns in an upstream transform (e.g. convert ROW/complex types to STRING/JSON)
  2. Remove unsupported columns from the sink schema
  3. Upgrade the selectdb-cloud connector to a version supporting the data type
  4. If the type should be supported, contribute a converter case and file an issue

Example fix

// before
field: ROW<a INT, b STRING>  // unsupported
// after
field: STRING  // cast row to JSON string via transform
Defensive patterns

Strategy: validation

Validate before calling

// check schema before writing
List<SeaTunnelDataType<?>> types = rowType.getFieldTypes();
for (SeaTunnelDataType<?> t : types) {
    if (!(SqlType.isBasic(t) || t.getSqlType() == SqlType.ARRAY
            || t.getSqlType() == SqlType.MAP || t.getSqlType() == SqlType.BYTES)) {
        throw new IllegalArgumentException("Unsupported by selectdb sink: " + t);
    }
}

Type guard

boolean isConvertible(SeaTunnelDataType<?> t) {
    SqlType s = t.getSqlType();
    return s == SqlType.ARRAY || s == SqlType.MAP || s == SqlType.BYTES
        || SqlType.STRING.equals(s) || SqlType.INT.equals(s)
        || SqlType.BIGINT.equals(s) || SqlType.BOOLEAN.equals(s);
}

Try / catch

try {
    converter.convert(dataType, val);
} catch (SelectDBConnectorException e) {
    if (e.getMessage().contains("is not supported")) {
        // fallback: serialize complex value to JSON string
        return JsonUtils.toJsonString(val);
    }
    throw e;
}

Prevention

When it happens

Trigger: Converting a row whose column type falls into the converter's default branch — e.g. ROW/struct nested types or types added in newer SeaTunnel API versions that the converter has no case for.

Common situations: Source schema containing complex types (arrays of structs, nested rows, decimals mapped oddly) that the sink converter does not support; version drift where a newer SeaTunnel type reaches an older converter.

Related errors


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