apache/seatunnel · error · DatabendConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Unsupported data type: {dataType.getSqlType()} What it means
DatabendCatalog.toDatabendTypeString encountered a SeaTunnel data type it cannot map to a Databend column type string. The method only handles a fixed set of supported types and throws in its default branch when the mapping is unknown, e.g. TIME or complex/array/map types. This prevents generating an invalid CREATE TABLE statement.
Source
Thrown at seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/catalog/DatabendCatalog.java:454
case DOUBLE:
return "DOUBLE";
case DECIMAL:
DecimalType decimalType = (DecimalType) dataType;
return String.format(
"DECIMAL(%d, %d)", decimalType.getPrecision(), decimalType.getScale());
case BYTES:
return "VARBINARY";
case STRING:
return "VARCHAR";
case DATE:
return "DATE";
case TIME:
return "TIME";
case TIMESTAMP:
LocalTimeType timeType = (LocalTimeType) dataType;
return "TIMESTAMP";
default:
throw new DatabendConnectorException(
DatabendConnectorErrorCode.UNSUPPORTED_DATA_TYPE,
"Unsupported data type: " + dataType.getSqlType());
}
}
private SeaTunnelDataType<?> convertDatabendType(
String typeName, int sqlType, int columnSize, int decimalDigits) {
// This method should convert Databend data types to SeaTunnel data types
// This is a simplified version, you'll need to adjust based on Databend's actual type
// system
typeName = typeName.toUpperCase();
switch (typeName) {
case "BOOLEAN":
return BasicType.BOOLEAN_TYPE;
case "TINYINT":
case "INT8":
return BasicType.BYTE_TYPE;View on GitHub (pinned to cf67b549a7)
Solutions
- Cast or transform the offending column to a supported type (e.g. map TIME to TIMESTAMP/DATETIME, flatten nested types) before writing to Databend
- Update the source config to exclude or convert unsupported columns
- Extend toDatabendTypeString with a case for the missing SqlType if you maintain the connector
Example fix
// before: schema contains TIME -> throws at default branch
case TIME:
return "TIME";
// after: map TIME to a Databend-supported type
case TIME:
return "TIMESTAMP"; Defensive patterns
Strategy: validation
Validate before calling
switch (dataType.getSqlType()) {
case STRING: case INT: case BIGINT: case TIMESTAMP:
break;
default:
throw new IllegalArgumentException(
"Column type not supported by Databend sink: " + dataType.getSqlType());
} Type guard
boolean isSupported(SeaTunnelDataType<?> t) {
return t instanceof BasicType || t instanceof LocalTimeType;
} Prevention
- Pre-map TIME and nested types to supported types in the source transform
- Review DatabendCatalog.toDatabendTypeString's supported cases before choosing column types
- Test schemas with a dry-run before production sync
When it happens
Trigger: Calling buildCreateTableSql (via catalog.createTable) when the CatalogTable schema contains a type outside the supported set, such as LocalTimeType.TIME, ARRAY, MAP, or ROW types.
Common situations: Source tables with TIME or nested (array/map/struct) columns being synced into Databend; schema inferred from a source connector that produces types Databend's type converter lacks cases for.
Related errors
- Unsupported Databend type: {}, fallback to STRING type
- UNSUPPORTED_DATA_TYPE
- Unsupported Vitess catalog SQL type:
- seaTunnelDataType cannot be null
- CONNECT_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c4eb1d5be17d77d2.
Report an issue: GitHub.