apache/seatunnel · error · DruidConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Unsupported data type ${fieldType} What it means
DruidWriter.transformToDimensionSchema only maps SMALLINT/INT/BIGINT to LongDimensionSchema and a set of numeric/string types to their respective schemas; any other SeaTunnel data type reaching the switch has no Druid dimension mapping and throws DruidConnectorException with UNSUPPORTED_DATA_TYPE.
Source
Thrown at seatunnel-connectors-v2/connector-druid/src/main/java/org/apache/seatunnel/connectors/druid/sink/DruidWriter.java:210
case TIMESTAMP:
case STRING:
dimensionSchemas.add(new StringDimensionSchema(columnName));
break;
case FLOAT:
dimensionSchemas.add(new FloatDimensionSchema(columnName));
break;
case DECIMAL:
case DOUBLE:
dimensionSchemas.add(new DoubleDimensionSchema(columnName));
break;
case TINYINT:
case SMALLINT:
case INT:
case BIGINT:
dimensionSchemas.add(new LongDimensionSchema(columnName));
break;
default:
throw new DruidConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
"Unsupported data type " + seaTunnelRowType.getFieldType(i));
}
}
return dimensionSchemas;
}
ParallelIndexIOConfig provideDruidIOConfig(final StringBuffer data) {
List<String> formatList =
Arrays.stream(seaTunnelRowType.getFieldNames()).collect(Collectors.toList());
formatList.add(TIMESTAMP_SPEC_COLUMN_NAME);
return new ParallelIndexIOConfig(
null,
new InlineInputSource(data.toString()),
new CsvInputFormat(formatList, DEFAULT_LINE_DELIMITER, null, false, 0),
false,
null);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Cast unsupported columns to supported types (INT/BIGINT/VARCHAR) via a SeaTunnel transform before the Druid sink.
- Exclude the unsupported column from the sink schema.
- Check DruidWriter's switch to confirm the list of supported types and map your schema accordingly.
- If the type should be supported, extend transformToDimensionSchema with a mapping (e.g. DoubleDimensionSchema for FLOAT/DOUBLE) in the connector.
Example fix
// before
// source column: DECIMAL amount -> Unsupported data type DECIMAL
// after (transform in config)
Transforms = [{
factory = Sql
sql = "SELECT CAST(amount AS DOUBLE) AS amount FROM source"
}] Defensive patterns
Strategy: validation
Validate before calling
for (int i = 0; i < rowType.getTotalFields(); i++) {
SeaTunnelDataType<?> t = rowType.getFieldType(i);
if (!(SqlType.INT.equals(t.getSqlType()) || SqlType.BIGINT.equals(t.getSqlType())
|| SqlType.STRING.equals(t.getSqlType()) || SqlType.DOUBLE.equals(t.getSqlType()))) {
throw new IllegalArgumentException("Druid sink unsupported type on column "
+ rowType.getFieldName(i) + ": " + t);
}
} Try / catch
try {
sink.write(seaTunnelRow);
} catch (DruidConnectorException e) {
if (CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE.equals(e.getErrorCode())) {
// add a CAST transform upstream or drop the column
} else throw e;
} Prevention
- Cast DECIMAL/DATE/complex types to primitives before the Druid sink
- Check the connector's supported type list when designing schemas
- Use Sql transform to normalize types for Druid
When it happens
Trigger: A sink table column whose SeaTunnel type (e.g. MAP, ARRAY, BYTES, DECIMAL, DATE/TIME beyond supported cases) is passed to dimensionSchemas while building the Druid ingestion spec.
Common situations: Sourcing from databases with DECIMAL or timestamp columns and writing to Druid without casting; complex types (arrays/maps) in the upstream schema; forgetting to apply a transform to cast unsupported types.
Related errors
- array inject error, unsupported data type: " + type
- COMMON_ERROR_CODE-17
- UNSUPPORTED_DATA_TYPE
- UNSUPPORTED_DATA_TYPE
- UNSUPPORTED_DATA_TYPE
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/197e9b82a66f7573.
Report an issue: GitHub.