apache/seatunnel · error · RedisConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
UnSupport redisDataType,only support string,list,hash,set,zset
What it means
RedisSinkWriter.doBatchWrite dispatches batch writes by the configured redis_data_type. When the resolved RedisDataType is not one of string, list, hash, set, or zset (or is null), the writer cannot translate the row into a Redis command and throws RedisConnectorException with UNSUPPORTED_DATA_TYPE. This is a terminal configuration validation failure for the sink.
Source
Thrown at seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/sink/RedisSinkWriter.java:304
rowKinds, keyBuffer, valueBuffer, redisParameters.getExpire());
return;
}
if (RedisDataType.SET.equals(redisDataType)) {
redisClient.batchWriteSet(
rowKinds, keyBuffer, valueBuffer, redisParameters.getExpire());
return;
}
if (RedisDataType.HASH.equals(redisDataType)) {
redisClient.batchWriteHash(
rowKinds, keyBuffer, valueBuffer, redisParameters.getExpire());
return;
}
if (RedisDataType.ZSET.equals(redisDataType)) {
redisClient.batchWriteZset(
rowKinds, keyBuffer, valueBuffer, redisParameters.getExpire());
return;
}
throw new RedisConnectorException(
CommonErrorCode.UNSUPPORTED_DATA_TYPE,
"UnSupport redisDataType,only support string,list,hash,set,zset");
}
private SerializationSchema createSerializationSchema(
RedisParameters redisParameters, SeaTunnelRowType rowType) {
RedisBaseOptions.Format format = redisParameters.getFormat();
switch (format) {
case JSON:
return new JsonSerializationSchema(rowType);
case TEXT:
String fieldDelimiter = redisParameters.getFieldDelimiter();
return TextSerializationSchema.builder()
.seaTunnelRowType(rowType)
.delimiter(fieldDelimiter)
.build();View on GitHub (pinned to cf67b549a7)
Solutions
- Set redis_data_type to one of: string, list, hash, set, zset in the sink config
- Check the exact spelling/case of the configured value against RedisDataType enum values
- If data type is derived dynamically, log the resolved redisDataType before flush and fix the upstream mapping
- If a legitimately needed type is missing, extend doBatchWrite with a branch and a corresponding client batch-write method
Example fix
// before redis_data_type = "sorted_set" // after redis_data_type = "zset"
Defensive patterns
Strategy: validation
Validate before calling
Set<String> supported = Set.of("string","list","hash","set","zset");
if (!supported.contains(cfg.get("redis_data_type"))) throw new IllegalArgumentException("Unsupported redis_data_type: " + cfg.get("redis_data_type")); Type guard
boolean isSupported(RedisDataType t) { return t != null && EnumSet.of(STRING, LIST, HASH, SET, ZSET).contains(t); } Prevention
- Validate redis_data_type against the enum at config load time
- Keep data type values lowercase and copied from docs
- Add a startup smoke test that constructs the sink writer with the production config
When it happens
Trigger: A Redis sink job runs with a redis_data_type value that maps to a type outside the supported set (or is unset/typo'd so no branch in doBatchWrite matches); batch rows reach flush() and fail on the first write attempt.
Common situations: Typo in redis_data_type config (e.g. 'hashes', 'sorted_set'); using a data type added to the enum for source-only features; programmatic RedisParameters built with a null/default data type.
Related errors
- Option 'field_delimiter' cannot be empty
- Option 'max_in_flight' must be greater than zero
- Option 'operation_timeout_ms' must be greater than zero
- Generate empty file when no data is not supported when parti
- TABLE_QUERY_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/842f94da1d5244d1.
Report an issue: GitHub.