Changing a field from String to Int in Pentaho Data Integration

24,173

Take Select/Rename values Step, and change the data-type in meta-data section.

Share:
24,173
Dan
Author by

Dan

Software Engineer who is keen at developing and learning new skills. I started out as a software tester and transitioned to a developer. My main language is Java...

Updated on January 22, 2020

Comments

  • Dan
    Dan over 4 years

    I am taking JSON information from our online API and producing it in a table with DI. I have 4 fields url, deviceId, displacement & timestamp. These are all recorded as Strings but I want them to be Int values, bar the url.

    In the Generate Rows section I tried changing each parameter to an Int but the results would not show up but if I left them as Strings, it will post the results.

    Any help on how I could change the data from type String to Int and still have my data reported?

  • arcee123
    arcee123 about 9 years
    I'm going to use this as well. What happens if there's a string accidentally in one of the rows? How do you default if it's not a number?
  • kelgwiin
    kelgwiin almost 8 years
    @arcee123 You can use the step script or call any class of java and validate from there