Pentaho Kettle conversion from String to Integer/Number error

user2552108 picture user2552108 · Jun 18, 2016 · Viewed 8.5k times · Source

I am new to Pentaho Kettle and I am trying to build a simple data transformation (filter, data conversion, etc). But I keep getting errors when reading my CSV data file (whether using CSV File Input or Text File Input).

The error is:

... couldn't convert String to number : non-numeric character found at position 1 for value [ ]

What does this mean exactly and how do I handle it?

Thank you in advance

Answer

user2552108 picture user2552108 · Jun 21, 2016

I have solved it. The idea is similar to what @nsousa suggested, but I didn't use the Trim option because I tried it and it didn't work on my case.

What I did is specify that if the value is a single space, it is set to null. In the Fields tab of the Text File Input, set the Null if column to space .

enter image description here