{"record":{"id":"4fcd0cec4332ed1c","repo":"alibaba/DataX","slug":"time-s","errorCode":null,"errorMessage":"TIME 类型转换错误：[%s]","messagePattern":"TIME 类型转换错误：\\[(.+?)\\]","errorType":"exception","errorClass":"SQLException","httpStatus":null,"severity":"error","filePath":"adswriter/src/main/java/com/alibaba/datax/plugin/writer/adswriter/insert/AdsInsertProxy.java","lineNumber":569,"sourceCode":"                            \"Date 类型转换错误：[%s]\", column));\n                }\n\n                if (null != utilDate) {\n                    sqlDate = new java.sql.Date(utilDate.getTime());\n                }\n                statement.setDate(preparedPatamIndex + 1, sqlDate);\n                break;\n\n            case Types.TIME:\n                java.sql.Time sqlTime = null;\n                try {\n                    if (\"\".equals(column.getRawData())) {\n                        utilDate = null;\n                    } else {\n                        utilDate = column.asDate();\n                    }\n                } catch (DataXException e) {\n                    throw new SQLException(String.format(\n                            \"TIME 类型转换错误：[%s]\", column));\n                }\n\n                if (null != utilDate) {\n                    sqlTime = new java.sql.Time(utilDate.getTime());\n                }\n                statement.setTime(preparedPatamIndex + 1, sqlTime);\n                break;\n\n            case Types.TIMESTAMP:\n                java.sql.Timestamp sqlTimestamp = null;\n                try {\n                    if (\"\".equals(column.getRawData())) {\n                        utilDate = null;\n                    } else {\n                        utilDate = column.asDate();\n                    }\n                } catch (DataXException e) {","sourceCodeStart":551,"sourceCodeEnd":587,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/adswriter/src/main/java/com/alibaba/datax/plugin/writer/adswriter/insert/AdsInsertProxy.java#L551-L587","documentation":"Same binding path as the DATE case, but for a target column of java.sql.Types.TIME in AdsInsertProxy: when column.asDate() throws DataXException the value cannot be converted to a time, and it is rethrown as SQLException 'TIME 类型转换错误：[<column>]' with the offending Column in brackets.","triggerScenarios":"Binding a TIME column from a Column that asDate() cannot parse - e.g. a string like '25:99:00', a locale-formatted time ('下午3点'), or a completely different type landed on this index due to column misalignment.","commonSituations":"Source systems exporting times in non-ISO formats (AM/PM, with timezone suffix), CSV readers with no format hint, or column-order drift between the configured column list and the ADS table.","solutions":["Inspect the bracketed value in the message and confirm it is a parseable time literal.","Normalize time strings upstream (e.g. to HH:mm:ss) or convert the column to a string/varchar target instead.","Verify the job column list order matches the ADS table's TIME column position.","Enable dirty-data collection so unparseable times are recorded instead of aborting the write."],"exampleFix":"# before\n3 o'clock PM\n# after\n15:00:00","handlingStrategy":"try-catch","validationCode":"static final Pattern TIME_RE = Pattern.compile(\"\\\\d{2}:\\\\d{2}:\\\\d{2}(.\\\\d+)?\");\nboolean isParseableTime(Column c) {\n    String raw = c == null ? null : c.asString();\n    return raw == null || \"\".equals(raw) || TIME_RE.matcher(raw.trim()).matches();\n}","typeGuard":null,"tryCatchPattern":"try {\n    proxy.fillStatement(...);\n} catch (SQLException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"TIME 类型转换错误\")) {\n        dirtyCollector.collect(currentRecord, e.getMessage());\n        return;\n    }\n    throw e;\n}","preventionTips":["Normalize times to HH:mm:ss (24h) upstream; strip AM/PM and timezone decorations.","Validate time-format columns with a sample-run before full loads.","Align the job's column list order with the ADS table definition."],"tags":["adswriter","time","data-conversion","dirty-data"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}