文档

Dataphin数据集成任务如何处理来源表字段中的数据存在空格

更新时间:
一键部署

问题描述

Dataphin配置集成任务,当来源表字段中的数据存在空格时会同步失败。

2021-09-26 11:04:50.998 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[          3] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-18","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-18 20:27:43","type":"STRING"},{"byteSize":15,"index":4,"rawData":"432042081812750","type":"STRING"},{"byteSize":13,"index":5,"rawData":"9402175254507","type":"STRING"},{"byteSize":6,"index":6,"rawData":200988,"type":"LONG"},{"byteSize":2,"index":7,"rawData":22,"type":"LONG"},{"byteSize":6,"index":8,"rawData":201701,"type":"LONG"},{"byteSize":6,"index":9,"rawData":200988,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"          3","type":"STRING"},{"byteSize":2,"index":13,"rawData":21,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"0.78000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.10000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"0.78000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"0.78000","type":"STRING"},{"byteSize":2,"index":18,"rawData":21,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"          3","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.10000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":19,"index":22,"rawData":"2021-09-18 20:40:03","type":"STRING"}],"type":"reader"}
2021-09-26 11:04:51.000 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[          3] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-18","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-18 22:16:11","type":"STRING"},{"byteSize":15,"index":4,"rawData":"462002514433048","type":"STRING"},{"byteSize":13,"index":5,"rawData":"9402081488463","type":"STRING"},{"byteSize":6,"index":6,"rawData":201853,"type":"LONG"},{"byteSize":2,"index":7,"rawData":22,"type":"LONG"},{"byteSize":6,"index":8,"rawData":201906,"type":"LONG"},{"byteSize":6,"index":9,"rawData":201853,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"          3","type":"STRING"},{"byteSize":2,"index":13,"rawData":21,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"0.59000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.08000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"0.59000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"0.59000","type":"STRING"},{"byteSize":2,"index":18,"rawData":21,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"          3","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.08000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":19,"index":22,"rawData":"2021-09-18 22:33:25","type":"STRING"}],"type":"reader"}
2021-09-26 11:04:51.005 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[         11] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-18","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-18 22:30:29","type":"STRING"},{"byteSize":15,"index":4,"rawData":"312075318535849","type":"STRING"},{"byteSize":0,"index":5,"rawData":"","type":"STRING"},{"byteSize":6,"index":6,"rawData":200247,"type":"LONG"},{"byteSize":1,"index":7,"rawData":2,"type":"LONG"},{"byteSize":6,"index":8,"rawData":200247,"type":"LONG"},{"byteSize":6,"index":9,"rawData":200247,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"         11","type":"STRING"},{"byteSize":2,"index":13,"rawData":22,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"2.86000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.43000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"2.86000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"2.86000","type":"STRING"},{"byteSize":2,"index":18,"rawData":22,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"         11","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.43000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":0,"index":22,"rawData":"","type":"STRING"}],"type":"reader"}
2021-09-26 11:04:51.008 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[          3] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-18","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-18 20:12:19","type":"STRING"},{"byteSize":15,"index":4,"rawData":"432041598096920","type":"STRING"},{"byteSize":13,"index":5,"rawData":"9402081222594","type":"STRING"},{"byteSize":6,"index":6,"rawData":201673,"type":"LONG"},{"byteSize":2,"index":7,"rawData":22,"type":"LONG"},{"byteSize":6,"index":8,"rawData":202692,"type":"LONG"},{"byteSize":6,"index":9,"rawData":201673,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"          3","type":"STRING"},{"byteSize":2,"index":13,"rawData":21,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"0.20000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.03000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"0.20000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"0.20000","type":"STRING"},{"byteSize":2,"index":18,"rawData":21,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"          3","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.03000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":19,"index":22,"rawData":"2021-09-18 20:36:18","type":"STRING"}],"type":"reader"}
2021-09-26 11:04:51.019 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[         11] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-18","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-18 23:14:45","type":"STRING"},{"byteSize":15,"index":4,"rawData":"312075328032202","type":"STRING"},{"byteSize":0,"index":5,"rawData":"","type":"STRING"},{"byteSize":6,"index":6,"rawData":201022,"type":"LONG"},{"byteSize":2,"index":7,"rawData":22,"type":"LONG"},{"byteSize":6,"index":8,"rawData":200055,"type":"LONG"},{"byteSize":6,"index":9,"rawData":201022,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"         11","type":"STRING"},{"byteSize":2,"index":13,"rawData":22,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"2.02000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.30000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"2.02000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"2.02000","type":"STRING"},{"byteSize":2,"index":18,"rawData":22,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"         11","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.30000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":0,"index":22,"rawData":"","type":"STRING"}],"type":"reader"}
2021-09-26 11:04:51.021 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[          1] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-18","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-18 03:38:39","type":"STRING"},{"byteSize":15,"index":4,"rawData":"432040348456492","type":"STRING"},{"byteSize":13,"index":5,"rawData":"9402175053450","type":"STRING"},{"byteSize":6,"index":6,"rawData":201545,"type":"LONG"},{"byteSize":2,"index":7,"rawData":22,"type":"LONG"},{"byteSize":6,"index":8,"rawData":201207,"type":"LONG"},{"byteSize":6,"index":9,"rawData":201545,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"          1","type":"STRING"},{"byteSize":2,"index":13,"rawData":21,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"0.26000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.04000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"0.26000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"0.26000","type":"STRING"},{"byteSize":2,"index":18,"rawData":21,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"          1","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.04000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":19,"index":22,"rawData":"2021-09-18 04:07:04","type":"STRING"}],"type":"reader"}
2021-09-26 11:04:51.024 [0-0-0-reader] ERROR DlinkTaskPluginCollector - 脏数据: 
{"message":"类型转换错误, 无法将[         12] 转换为[LONG]","record":[{"byteSize":10,"index":0,"rawData":"2021-09-18","type":"STRING"},{"byteSize":10,"index":1,"rawData":"2021-09-17","type":"STRING"},{"byteSize":10,"index":2,"rawData":"2021-09-17","type":"STRING"},{"byteSize":19,"index":3,"rawData":"2021-09-17 23:50:08","type":"STRING"},{"byteSize":15,"index":4,"rawData":"432039792072925","type":"STRING"},{"byteSize":0,"index":5,"rawData":"","type":"STRING"},{"byteSize":6,"index":6,"rawData":201022,"type":"LONG"},{"byteSize":2,"index":7,"rawData":22,"type":"LONG"},{"byteSize":6,"index":8,"rawData":200055,"type":"LONG"},{"byteSize":6,"index":9,"rawData":201022,"type":"LONG"},{"byteSize":0,"index":10,"rawData":"","type":"STRING"},{"byteSize":6,"index":11,"rawData":200000,"type":"LONG"},{"byteSize":11,"index":12,"rawData":"         12","type":"STRING"},{"byteSize":2,"index":13,"rawData":22,"type":"LONG"},{"byteSize":7,"index":14,"rawData":"4.17000","type":"STRING"},{"byteSize":7,"index":15,"rawData":"0.75000","type":"STRING"},{"byteSize":7,"index":16,"rawData":"4.17000","type":"STRING"},{"byteSize":7,"index":17,"rawData":"4.17000","type":"STRING"},{"byteSize":2,"index":18,"rawData":22,"type":"LONG"},{"byteSize":11,"index":19,"rawData":"         12","type":"STRING"},{"byteSize":7,"index":20,"rawData":"0.75000","type":"STRING"},{"byteSize":7,"index":21,"rawData":"0.00000","type":"STRING"},{"byteSize":0,"index":22,"rawData":"","type":"STRING"}],"type":"reader"}

解决方案

使用trim函数对来源表字段进行数据的空格处理。

适用于

  • Dataphin
  • 本页导读