Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 删除Talend中的无效值_Java_Talend - Fatal编程技术网

Java 删除Talend中的无效值

Java 删除Talend中的无效值,java,talend,Java,Talend,我有一个带有日期列的excel输入文件,其中一些日期不正确,在执行我的作业时,出现以下错误 The cell format is not Date in ( Row. 128 and ColumnNum. 3 ) The cell format is not Date in ( Row. 172 and ColumnNum. 3 ) The cell format is not Date in ( Row. 315 and ColumnNum. 3 ) The cell format is no

我有一个带有日期列的excel输入文件,其中一些日期不正确,在执行我的作业时,出现以下错误

The cell format is not Date in ( Row. 128 and ColumnNum. 3 )
The cell format is not Date in ( Row. 172 and ColumnNum. 3 )
The cell format is not Date in ( Row. 315 and ColumnNum. 3 )
The cell format is not Date in ( Row. 406 and ColumnNum. 3 )
然后我想过滤这些值,以避免此类错误 事实上,日期不正确的行包含值“-”,这意味着我们不知道正确的日期。如果我可以简单地过滤所有日期格式不正确的行,那就太好了

我正在考虑一个过滤器或If条件,但由于我的输入列是一个日期,我有一些困难


有什么帮助吗?谢谢:)

您可以从excel中以字符串形式检索日期字段,这样就不会出现任何错误。然后使用tFilterRow,可以排除日期为“-”的行。然后使用TalendDate.parseDate方法在tMap中将字符串转换为日期。

第一步是将日期字段作为字符串从excel中检索:这样就不会出现任何错误。然后使用tFilterRow,可以排除日期为“-”的行。然后,使用TalendDate.parseDate方法在tMap中将字符串转换为日期。

您可以发布作业的代码吗?代码背后没有什么真正有趣的东西,因为我只是放置了一些没有真正函数的组件`*[tFilterRow_8 end]start/currentComponent=“tFilterRow_8”;全局映射put(“tFilterRow_8_NB_线”,NB_线_tFilterRow_8);全局映射put(“过滤错误8\u NB\u线\u正常”,NB\u线\u正常\u过滤错误8);全局映射put(“过滤错误8\u NB\u线拒绝”,NB\u线拒绝\u过滤错误8);ok_Hash.put(“tFilterRow_8”,true);end_Hash.put(“tFilterRow_8”,System.currentTimeMillis());/**[tFilterRow_8 end]stop*/`你能发布作业的代码吗?代码背后没有什么真正有趣的东西,因为我只是放置了一些没有真正功能的组件`*[tFilterRow_8 end]start/currentComponent=“tFilterRow_8”;全局映射put(“tFilterRow_8_NB_线”,NB_线_tFilterRow_8);全局映射put(“过滤错误8\u NB\u线\u正常”,NB\u线\u正常\u过滤错误8);全局映射put(“过滤错误8\u NB\u线拒绝”,NB\u线拒绝\u过滤错误8);ok_Hash.put(“tFilterRow_8”,true);end_Hash.put(“tFilterRow_8”,System.currentTimeMillis());/**[tFilterRow_8 end]停止*/`