alibaba/DataX · error · RuntimeException
Unknown column type:
Error message
Unknown column type:
What it means
DatahubReaderUtils throws this RuntimeException while converting a Datahub field to a DataX Column: the field's Datahub type fell through every supported branch (STRING, BIGINT, BOOLEAN, DOUBLE, TIMESTAMP and its units) and hit the default case. The message includes field.getType(), the raw Datahub FieldType enum, so the unsupported type is identifiable.
Source
Thrown at datahubreader/src/main/java/com/alibaba/datax/plugin/reader/datahubreader/DatahubReaderUtils.java:194
}
case TIMESTAMP: {
Long value = (Long) o.getField(field.getName());
if ("MILLISECOND".equals(timeStampUnit)) {
// MILLISECOND, 13位精度,直接 new Date()
col = new DateColumn(value == null ? null : new Date(value));
}
else if ("SECOND".equals(timeStampUnit)){
col = new DateColumn(value == null ? null : new Date(value * 1000));
}
else {
// 默认都是 MICROSECOND, 16位精度, 和之前的逻辑保持一致。
col = new DateColumn(value == null ? null : new Date(value / 1000));
}
break;
}
default:
throw new RuntimeException("Unknown column type: " + field.getType());
}
return col;
}
}
View on GitHub (pinned to 80ec23d5c5)
Solutions
- Note the field type printed in the message and check whether your DataX version's DatahubReaderUtils supports it.
- Recreate or alter the Datahub topic schema to use supported types (STRING, BIGINT, BOOLEAN, DOUBLE, TIMESTAMP).
- Upgrade the DataX datahubreader plugin to a build that maps the additional FieldType.
- As a workaround, cast the field to STRING in the topic schema if downstream allows.
Example fix
// before: topic field DECIMAL -> default branch throws
// after: redefine field type in Datahub schema
{ "name": "amount", "type": "DOUBLE" } // or "STRING" to pass through raw Defensive patterns
Strategy: validation
Validate before calling
Set<FieldType> SUPPORTED = Set.of(FieldType.STRING, FieldType.BIGINT, FieldType.BOOLEAN, FieldType.DOUBLE, FieldType.TIMESTAMP);
for (Field f : topicSchema.getFields())
if (!SUPPORTED.contains(f.getType())) throw new IllegalArgumentException("datahubreader cannot read field '" + f.getName() + "' of type " + f.getType()); Type guard
boolean isSupportedDatahubType(FieldType t) { return t == FieldType.STRING || t == FieldType.BIGINT || t == FieldType.BOOLEAN || t == FieldType.DOUBLE || t == FieldType.TIMESTAMP; } Prevention
- Validate the topic schema against the reader's supported types before subscribing.
- Track Datahub FieldType additions vs your DataX build; upgrade the plugin when new types appear.
When it happens
Trigger: Reading a Datahub tuple topic whose schema contains a field type this reader version does not map — e.g. DECIMAL, FLOAT, SMALLINT, TINYINT, INTEGER, VARCHAR, or any newly added Datahub FieldType. Conversion happens per record, so the reader fails on the first tuple containing that field.
Common situations: Datahub schema evolved to use DECIMAL/VARCHAR while the bundled datax datahubreader plugin predates support for it; or a topic created with the newer Datahub console defaults (e.g. DECIMAL for numeric fields) is pointed at an older DataX build.
Related errors
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/5e513b0dc2be693e.
Report an issue: GitHub.