Pentaho

 View Only

 Variable passing in switch case

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Pradeep Jha's profile image
Pradeep Jha posted 05-01-2019 15:04

I m new to pentaho,I m reading a text file and it has record which contain header as date and file name.

FIle format is something as

H22042019EMP

asalsakslaks

asasasasas

header is 22042019EMP and then details records, now I want to direct header to some other text file and detail to other.I have use switch case with contain option based on date.

Here I am passing date as variable which I pass when I execute the transformation.But some how it is not able to direct that header record to other file.When I hard code the date then it work perfectly.Please suggest


#PentahoDataIntegrationPDI
#Kettle
#Pentaho
Derek Wilson's profile image
Derek Wilson

Pradeep, can you provide more detail as to the behavior you are seeking? Also, can you provide more detail about where your transformation is failing? Do you have an example ktr you can provide?

Here's what I understand. You have a data file where the first row header includes strong representing a data-time. You wish to extract that date-time, interrogate it, and determine the desired treatment of the detailed data. Please correct me if incorrect.

Johan Hammink's profile image
Johan Hammink

In the text file input step (or csv file input step) you can add a row nr to the result. Then split on rownr. First row is header and others are detail records