2016-09-23 54 views
1

我有Pentaho 6.1 CSV文件输入步骤的奇怪问题。Pentaho CSV文件输入步骤 - 外壳中的逗号分隔符

我在CSV文件以下值:

"2016-09-16","test","","test","test, S.L.","[test]","test",39.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000

我在CSV使用文件输入步:

Delimiter: , 
Enclosure: " 

预览选项完美的作品,但是当我试图导入内容数据库表和执行转换我得到以下错误:

2016/09/23 22:04:46 - Write to log.0 - 2016/09/23 22:04:46 - Write to log.0 - 2016/09/23 22:04:46 - Write to log.0 - at org.pentaho.di.core.row.value.ValueMetaBase.convertStringToNumber(ValueMetaBase.java:803) 2016/09/23 22:04:46 - Write to log.0 - at org.pentaho.di.core.row.value.ValueMetaBase.getNumber(ValueMetaBase.java:1631) 2016/09/23 22:04:46 - Write to log.0 - ... 7 more 2016/09/23 22:04:46 - Write to log.0 - Caused by: org.pentaho.di.core.exception.KettleValueException: 2016/09/23 22:04:46 - Write to log.0 - requests String : couldn't convert String to number : non-numeric character found at position 1 for value [S.L.","[test]","test",38.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000

我假设它有这是一个跟随价值“测试,S.L.”的问题。 (第5栏)。我不明白为什么因为预览选项有效。

回答

1

我尝试了你的输入设置,并且相信与否,我对嵌入式逗号没有任何问题。数字字段的转换似乎是什么问题。我将它们设置为Number数据类型并用掩码弄乱,但唯一使它工作的是指定修剪类型“Left”。当我这样做时,一切都很好。

enter image description here

+0

谢谢,这似乎工作。 – wlodi83

+0

太棒了!你能将答案标记为已接受吗? –