AnsweredAssumed Answered

How can we add headers rows (lines) when generating a text file with KETTLE

Question asked by frederic MARCHAL on Oct 8, 2018
Latest reply on Oct 9, 2018 by Ana Gonzalez

We would like to generate N output text files from one original input text file.

Each output text file is generated for one value of a specific field  ( segment01 ) from the input text file.

Because there are N possible values for segment01 in input file, N output files should be generated.

Each text file should contain the value for fields segment02, segment03, .......segment11 ( from the input text file).


But before inserting the value for these fields, we must insert, at the top of each output file, first header rows that are constant string and for the other ones, the current year, and the current month.... and finally a row that is a mix of constant string and segment01 value ( see below ) :






!Year=current Year   


!Period=Current month


! Segment01_TRIRIGA;B;R;P;<Entity Curr Adjs>; ;CONSO;Segment01;       


We succeed to generate the N output files with Pentaho Kettle but we don't know how to insert the header rows described above at the head of each output file.

Does anyone know how to do this ?


Thanks in advance for your feedback.


Best regards