Pentaho Kettle conversion from String to Integer/Number error

10,628

Solution 1

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

Solution 2

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

Share:
10,628
user2552108
Author by

user2552108

Updated on August 04, 2022

Comments

  • user2552108
    user2552108 almost 2 years

    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