Pentaho

 View Only

 How to use string cut to get the starting positions to length of position on the value .

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
rani p's profile image
rani p posted 06-05-2021 19:11

I have input

File_name

11_abc sales

12_d sales

 

I am looking for output

File_name

11_abc

12_d

 

Could you any of you give me some points to get the output.


#Kettle
#Pentaho
#PentahoDataIntegrationPDI
Ana Gonzalez's profile image
Ana Gonzalez

You would need previous steps to calculate string length and search for the position of the whitespace, it's probably easier using the Regex Evaluation step to get it done in one step. For example, with this expression:

(.*)(\s.*)

you get two strings as output, one with everything until the whitespace and another with the rest of the string.