apache/seatunnel · error · SeaTunnelRuntimeException

COMMON-17

COMMON-17

Error message

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

What it means

XuguTypeConverter.convert() maps a XuGu database column type to a SeaTunnel data type while reading. Types with no case in the switch hit default and throw CommonError.convertToSeaTunnelTypeError, including the XuGu type string and column name. The source cannot represent that column in SeaTunnel's type system.

Solutions

  1. Cast the column to a supported type in the source query (e.g. CAST(col AS VARCHAR)).
  2. Create a XuGu view that casts/excludes unsupported columns and read from it.
  3. Exclude the column from the connector's query/schema.
  4. Upgrade the connector or add a convert case for the type and contribute upstream.

Example fix

// before: reading RAW/blob col directly
// after
SELECT id, CAST(bin_col AS VARCHAR) AS bin_col_str FROM t
Defensive patterns

Strategy: validation

Validate before calling

-- Audit XuGu table columns before reading; whitelist supported types
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'MY_TABLE';
-- flag types not in: VARCHAR/CHAR/INT/BIGINT/DECIMAL/DOUBLE/DATE/TIME/TIMESTAMP/BOOLEAN/BINARY

Try / catch

try {
    sourceReader.read();
} catch (SeaTunnelRuntimeException e) {
    if (e.getMessage().contains("unsupported convert type")) {
        // create a view with CAST for the named column and point the connector at it
    } else { throw e; }
}

Prevention

When it happens

Trigger: Reading a XuGu table whose column type string (xuguDataType) is not among the handled constants — e.g. spatial, BLOB variants, or newer XuGu types not covered by the converter.

Common situations: XuGu deployments using CLOB/BLOB or spatial extensions; type naming differences across XuGu versions; tables created outside the connector's tested surface.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/xugu/XuguTypeConverter.java:212

                break;
            case XUGU_TIMESTAMP:
                builder.dataType(LocalTimeType.LOCAL_DATE_TIME_TYPE);
                if (typeDefine.getScale() == null) {
                    builder.scale(TIMESTAMP_DEFAULT_SCALE);
                } else {
                    builder.scale(typeDefine.getScale());
                }
                break;
            case XUGU_TIMESTAMP_WITH_TIME_ZONE:
                builder.dataType(LocalTimeType.OFFSET_DATE_TIME_TYPE);
                if (typeDefine.getScale() == null) {
                    builder.scale(TIMESTAMP_DEFAULT_SCALE);
                } else {
                    builder.scale(typeDefine.getScale());
                }
                break;
            default:
                throw CommonError.convertToSeaTunnelTypeError(
                        DatabaseIdentifier.XUGU, xuguDataType, 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(XUGU_BOOLEAN);
                builder.dataType(XUGU_BOOLEAN);
                break;

View on GitHub (pinned to cf67b549a7)