Hello,
I'm beginning with Talend for Data Integration, and I've been struggling to build the below process,
any help would be much appreciated.
My goals is the following:
- read a directory containing csv files and input in tFileInputDelimited => ok
- extract header (2 lines) then memorize the value of the row1 columns in order to reuse them
- Then build a csv outfile with the following output : <Value of the header (row1)>, <value of column1 of each row > 2 >, <value of of column2 of each row > 2> ....
Basically I want the value of the header (row1) as a constant in the column1 of each row > 2.
I have been trying different solution one with a tmap to split the out in 2 rows based on a regex on first row, but when I'm trying to merge those into the output row afterwards with a tjavarow, value is appearing only on the first line because of the iteration process.
I also tried with tSetGlobalVar but I didn't find a way to input row value into a GlobalVar.
Also tried with tMemorize row and calling the memorized row in the tJavaRow (see screenshot below) but no luck again because of the iteration process I guess, I'm having only the first row in the output file filled with the value of row1
If you have any idea on how I could achieve this with Talend it would be nice, if not I'll do this task by standard scripting.
Many thanks in advance
Regards
Flo