{"record":{"id":"5e513b0dc2be693e","repo":"alibaba/DataX","slug":"unknown-column-type","errorCode":null,"errorMessage":"Unknown column type: ","messagePattern":"Unknown column type: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"datahubreader/src/main/java/com/alibaba/datax/plugin/reader/datahubreader/DatahubReaderUtils.java","lineNumber":194,"sourceCode":"            }\n            case TIMESTAMP: {\n                Long value = (Long) o.getField(field.getName());\n\n                if (\"MILLISECOND\".equals(timeStampUnit)) {\n                    // MILLISECOND, 13位精度，直接 new Date()\n                    col = new DateColumn(value == null ? null : new Date(value));\n                }\n                else if (\"SECOND\".equals(timeStampUnit)){\n                    col = new DateColumn(value == null ? null : new Date(value * 1000));\n                }\n                else {\n                    // 默认都是 MICROSECOND, 16位精度， 和之前的逻辑保持一致。\n                    col = new DateColumn(value == null ? null : new Date(value / 1000));\n                }\n                break;\n            }\n            default:\n                throw new RuntimeException(\"Unknown column type: \" + field.getType());\n        }\n        \n        return col;\n    }\n    \n}\n","sourceCodeStart":176,"sourceCodeEnd":201,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/datahubreader/src/main/java/com/alibaba/datax/plugin/reader/datahubreader/DatahubReaderUtils.java#L176-L201","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: topic field DECIMAL -> default branch throws\n// after: redefine field type in Datahub schema\n{ \"name\": \"amount\", \"type\": \"DOUBLE\" } // or \"STRING\" to pass through raw","handlingStrategy":"validation","validationCode":"Set<FieldType> SUPPORTED = Set.of(FieldType.STRING, FieldType.BIGINT, FieldType.BOOLEAN, FieldType.DOUBLE, FieldType.TIMESTAMP);\nfor (Field f : topicSchema.getFields())\n  if (!SUPPORTED.contains(f.getType())) throw new IllegalArgumentException(\"datahubreader cannot read field '\" + f.getName() + \"' of type \" + f.getType());","typeGuard":"boolean isSupportedDatahubType(FieldType t) { return t == FieldType.STRING || t == FieldType.BIGINT || t == FieldType.BOOLEAN || t == FieldType.DOUBLE || t == FieldType.TIMESTAMP; }","tryCatchPattern":null,"preventionTips":["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."],"tags":["datax","datahub","reader","schema","type-conversion"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}