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 KingbaseTypeConverter.reconvert() when a SeaTunnel column type cannot be converted to a Kingbase column type for sink writes/table creation. It delegates to the generic super reconvert and re-wraps any SeaTunnelRuntimeException as a Kingbase-specific COMMON-19 error, so any SeaTunnel SqlType unsupported by the base JDBC conversion produces this.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/kingbase/KingbaseTypeConverter.java:226
byteLength += typeDefine.getLength() % 8 > 0 ? 1 : 0;
builder.columnLength(byteLength);
break;
default:
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.KINGBASE,
typeDefine.getDataType(),
typeDefine.getName());
}
return builder.build();
}
}
@Override
public BasicTypeDefine reconvert(Column column) {
try {
return super.reconvert(column);
} catch (SeaTunnelRuntimeException e) {
throw CommonError.convertToConnectorTypeError(
DatabaseIdentifier.KINGBASE,
column.getDataType().getSqlType().name(),
column.getName());
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Identify the unsupported SeaTunnel SqlType from '<dataType>' in the message.
- Pre-create the target Kingbase table and disable sink auto-creation so reconvert isn't invoked for DDL.
- Add a Transform to cast unsupported columns to simple types (STRING, INT, etc.) before the sink.
- Extend KingbaseTypeConverter.reconvert() with an explicit mapping if the type has a Kingbase equivalent.
Example fix
// before
sink auto-create with ARRAY column -> error
// after
transform: Sql { sql = "SELECT id, array_to_string(tags, ',') AS tags FROM source" } Defensive patterns
Strategy: validation
Validate before calling
// Check the SeaTunnel schema is mappable to Kingbase before writing
for (Column col : schema.getColumns()) {
try { new KingbaseTypeConverter().reconvert(col); }
catch (SeaTunnelRuntimeException e) {
throw new IllegalStateException("Kingbase sink cannot map column " + col.getName() + " of " + col.getDataType());
}
} Type guard
boolean isKingbaseSinkColumnValid(Column col) {
try { new KingbaseTypeConverter().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("Cast column " + column.getName() + " to a basic type before the Kingbase sink");
}
throw e;
} Prevention
- Pre-create the Kingbase sink table and disable auto-create.
- Cast arrays/maps/nested types to strings with a Transform first.
- Keep the sink schema to simple scalar types.
- Dry-run schema conversion before production.
When it happens
Trigger: reconvert(Column) on KingbaseTypeConverter when column.getDataType().getSqlType() has no mapping in super.reconvert() — the catch at KingbaseTypeConverter.java:226 converts it to COMMON-19. Typical for ARRAY/MAP/complex types or types the base converter rejects.
Common situations: Auto-creating a Kingbase sink table from sources emitting complex types (nested JSON, arrays); pipelines where the SeaTunnel schema was widened (e.g. TIME with precision) beyond what the base converter supports.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/dce4d957d2127460.
Report an issue: GitHub.