apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-17

COMMON-17

Error message

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

What it means

RedshiftTypeConverter.convert() throws this when a Redshift column type is not handled locally; it first delegates to the parent JDBC converter (super.convert), and if that also fails the exception is rethrown as CommonError.convertToSeaTunnelTypeError with DatabaseIdentifier.REDSHIFT. So any type unsupported by both Redshift-specific and generic JDBC mappings triggers it.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/redshift/RedshiftTypeConverter.java:187

                builder.sourceType(REDSHIFT_TIMETZ);
                builder.dataType(LocalTimeType.LOCAL_TIME_TYPE);
                builder.scale(MAX_TIME_SCALE);
                break;
            case REDSHIFT_TIMESTAMP:
                builder.sourceType(REDSHIFT_TIMESTAMP);
                builder.dataType(LocalTimeType.LOCAL_DATE_TIME_TYPE);
                builder.scale(MAX_TIMESTAMP_SCALE);
                break;
            case REDSHIFT_TIMESTAMPTZ:
                builder.sourceType(REDSHIFT_TIMESTAMPTZ);
                builder.dataType(LocalTimeType.OFFSET_DATE_TIME_TYPE);
                builder.scale(MAX_TIMESTAMP_SCALE);
                break;
            default:
                try {
                    return super.convert(typeDefine);
                } catch (SeaTunnelRuntimeException e) {
                    throw CommonError.convertToSeaTunnelTypeError(
                            DatabaseIdentifier.REDSHIFT,
                            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:

View on GitHub (pinned to cf67b549a7)

Solutions

  1. CAST the unsupported column in the query (e.g. SUPER columns via JSON functions like JSON_SERIALIZE)
  2. Enable explicit column selection excluding unsupported columns
  3. Upgrade SeaTunnel for improved Redshift SUPER/type support or extend RedshiftTypeConverter

Example fix

// before: SELECT data FROM t (SUPER)
// after
String query = "SELECT JSON_SERIALIZE(data) AS data FROM t";
Defensive patterns

Strategy: validation

Validate before calling

// Probe Redshift column types before reading:
ResultSet cols = meta.getColumns(null, schema, table, null);
Set<String> risky = Set.of("SUPER","GEOMETRY","GEOGRAPHY","HLL_SKETCH","PARTIAL_DATE");
while (cols.next()) {
    String tn = cols.getString("TYPE_NAME").toUpperCase();
    if (risky.contains(tn)) {
    LOG.warn("Cast or JSON_SERIALize Redshift column {} of type {}", cols.getString("COLUMN_NAME"), tn);
    }
}

Try / catch

try {
    return super.convert(typeDefinition);
} catch (SeaTunnelRuntimeException e) {
    LOG.warn("Unsupported Redshift type; cast in query: {}", e.getMessage());
    throw e; // or exclude the column
}

Prevention

When it happens

Trigger: Reading a Redshift table whose column type (e.g. SUPER subtypes, unsupported geometry or custom types) fails both the Redshift switch and AbstractJdbcTypeConverter.convert.

Common situations: Redshift tables using SUPER object columns on older connector versions, geometry columns, or recently added Redshift types; catalog read fails when the job starts.

Related errors


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