3

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

user2552108
  • 1,107
  • 3
  • 15
  • 30

2 Answers2

4

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

user2552108
  • 1,107
  • 3
  • 15
  • 30
2

That value looks like an empty space. Set the Format of the Integer field to # and set trim to both.

nsousa
  • 4,448
  • 1
  • 10
  • 15