apache/seatunnel · error · org.apache.seatunnel.common.exception.SeaTunnelRuntimeException

COMMON-19

COMMON-19

Error message

'<identifier>' unsupported convert SeaTunnel data type '<dataType>' of '<field>' to connector data type.

What it means

Thrown by IrisTypeConverter.reconvert() when a SeaTunnel data type (from the upstream schema) cannot be mapped back to an IRIS column type for sink table creation or write. The default branch in reconvert() covers any SeaTunnel SqlType the IRIS dialect does not support writing. It fails during sink schema preparation, before rows are written.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/iris/IrisTypeConverter.java:428

                                        + "it will be converted to time({})",
                                column.getName(),
                                column.getScale(),
                                MAX_TIME_SCALE,
                                timeScale);
                    }
                    builder.columnType(String.format("%s(%s)", IRIS_TIME, timeScale));
                    builder.scale(timeScale);
                } else {
                    builder.columnType(IRIS_TIME);
                }
                break;
            case TIMESTAMP:
                builder.columnType(IRIS_TIMESTAMP2);
                builder.dataType(IRIS_TIMESTAMP2);
                break;

            default:
                throw CommonError.convertToConnectorTypeError(
                        DatabaseIdentifier.IRIS,
                        column.getDataType().getSqlType().name(),
                        column.getName());
        }
        return builder.build();
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Read the SeaTunnel type name from the error '<dataType>' and check IRIS dialect support in IrisTypeConverter.reconvert().
  2. Disable auto table creation and pre-create the IRIS table with an appropriate type, then configure the sink for insert-only.
  3. Insert a Transform (e.g. cast) in the pipeline to convert unsupported columns to supported types (STRING, BYTES, etc.).
  4. Add a reconvert mapping case for the missing SeaTunnel type if it should be supported.

Example fix

// before (config)
source: complex source with VECTOR column -> sink: IRIS auto-create
// after
transform: Sql { sql = "SELECT id, CAST(vec AS STRING) AS vec FROM source" }
Defensive patterns

Strategy: validation

Validate before calling

// Validate the SeaTunnel schema before writing to IRIS
for (Column col : catalogTable.getTableSchema().toPhysicalRowDataType().getColumns()) {
    try { new IrisTypeConverter().reconvert(col); }
    catch (SeaTunnelRuntimeException e) {
        throw new IllegalStateException("IRIS sink cannot map column " + col.getName() + " of type " + col.getDataType());
    }
}

Type guard

boolean isIrisValidSinkColumn(Column col) {
    try { new IrisTypeConverter().reconvert(col); return true; }
    catch (SeaTunnelRuntimeException e) { return false; }
}

Try / catch

try {
    converter.reconvert(column);
} catch (SeaTunnelRuntimeException e) {
    if (e.getMessage().contains("unsupported convert SeaTunnel data type")) {
        throw new IllegalArgumentException("Use only IRIS-supported types for sink schema: " + e.getMessage());
    }
    throw e;
}

Prevention

When it happens

Trigger: Writing a SeaTunnel dataset to IRIS whose column SqlType hits the default branch at IrisTypeConverter.java:428 — e.g. SeaTunnel MAP/ARRAY/VECTOR types, or types unsupported by the IRIS dialect in reconvert (only TIMESTAMP etc. shown handled).

Common situations: Sink 'auto-create-table' to IRIS from a source producing complex types (e.g. MongoDB nested fields, vector embeddings); schema transformation pipelines outputting types IRIS can't express.

Related errors


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