apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-17

COMMON-17

Error message

'${identifier}' unsupported convert type '${dataType}' of '${field}' to SeaTunnel data type.

What it means

PhoenixTypeConverter.convert() throws this when a Phoenix column's JDBC type cannot be mapped to a SeaTunnel data type. The switch over the column's data type hits the default branch, meaning the type is outside the supported Phoenix→SeaTunnel mapping. It is raised via CommonError.convertToSeaTunnelTypeError with identifier PHOENIX, embedding the field name and unsupported type in the message.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/phoenix/PhoenixTypeConverter.java:163

                break;
            case PHOENIX_DATE:
            case PHOENIX_DATE_UNSIGNED:
                builder.dataType(LocalTimeType.LOCAL_DATE_TYPE);
                break;
            case PHOENIX_TIME:
            case PHOENIX_TIME_UNSIGNED:
                builder.dataType(LocalTimeType.LOCAL_TIME_TYPE);
                break;
            case PHOENIX_TIMESTAMP:
            case PHOENIX_TIMESTAMP_UNSIGNED:
                builder.dataType(LocalTimeType.LOCAL_DATE_TIME_TYPE);
                break;
            case PHOENIX_BINARY:
            case PHOENIX_VARBINARY:
                builder.dataType(PrimitiveByteArrayType.INSTANCE);
                break;
            default:
                throw CommonError.convertToSeaTunnelTypeError(
                        PHOENIX, typeDefine.getDataType(), typeDefine.getName());
        }
        return builder.build();
    }

    @Override
    public BasicTypeDefine reconvert(Column column) {
        BasicTypeDefine.BasicTypeDefineBuilder builder =
                BasicTypeDefine.builder()
                        .name(column.getName())
                        .nullable(column.isNullable())
                        .comment(column.getComment())
                        .defaultValue(column.getDefaultValue());
        switch (column.getDataType().getSqlType()) {
            case BOOLEAN:
                builder.columnType(PHOENIX_BOOLEAN);
                builder.dataType(PHOENIX_BOOLEAN);
                break;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Identify the unsupported column type from the error message and drop, cast, or exclude that column in the SeaTunnel config (use query/table-list filtering to avoid it)
  2. Add a mapping case for the type in PhoenixTypeConverter.convert and rebuild the connector
  3. Pin/upgrade SeaTunnel to a version that supports the Phoenix type

Example fix

// before: column 'bin_extra' of unsupported type breaks convert
// after: exclude or cast in SQL source
String query = "SELECT id, name, CAST(unsupported_col AS VARCHAR) FROM phoenix_table";
Defensive patterns

Strategy: validation

Validate before calling

// Before job run, verify all Phoenix column types are supported:
ResultSet cols = meta.getColumns(null, schema, table, null);
while (cols.next()) {
    String type = cols.getString("TYPE_NAME");
    Set<String> supported = Set.of("INTEGER","UNSIGNED_INT","BIGINT","UNSIGNED_LONG","VARCHAR","CHAR","FLOAT","DOUBLE","DECIMAL","BOOLEAN","TIME","DATE","TIMESTAMP","BINARY","VARBINARY");
    if (!supported.contains(type.toUpperCase())) throw new IllegalStateException("Unsupported Phoenix type: " + type);
}

Try / catch

try {
    catalogTable = converter.convert(typeDefinition);
} catch (SeaTunnelRuntimeException e) {
    LOG.warn("Skipping unsupported Phoenix column: {}", e.getMessage());
    // exclude column and continue
}

Prevention

When it happens

Trigger: Reading a Phoenix table whose column has an unsupported SQL type (e.g. unsupported numeric/date variants not covered by the switch cases) during catalog table construction — specifically in PhoenixTypeConverter.convert when theColumnType falls into default.

Common situations: Syncing Phoenix tables containing exotic types like arrays of unsupported element types, user-defined types, or types introduced in newer Phoenix versions not yet handled by the converter; auto table creation / schema inference on such tables fails at job startup.

Related errors


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