Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I'am facing a problem in the design of a new job.
My input file structure is :
Product Price
I have too many files as input each file refer to one month. The price is not fixed , it change from month to month what i am asked to do is to create 1 file with this schema
Product FileName1 FileName2 FileName3 . . .
Product 1 PriceintheFile1 PriceintheFile2 PriceintheFile3 ...
Product 2 PriceintheFile1 PriceintheFile2 PriceintheFile3 ...
etc
The File Name is the date of each month by the way.
what i have dont so far is :
TfileList=>TFileInputDelimited=>Tmap=>TFileInputDelimited
in the Tmap i coudnt make the column's name dynamic.
Is this can be done with Talend ?
Thanks a lot for your time.
Hi Rami,
This is a very interesting scenario and I guess you may have to approach the issue as below:
Step :1
Push your output to a file where you include the filepath as one of the columns (like below)
file_path,prod_code,prod_price
C:\filepath\month_jan.txt,1001,100
C:\filepath\month_jan.txt,1002,105
C:\filepath\month_feb.txt,1001,100
C:\filepath\month_feb.txt,1002,105
Step :2
Use a component tUnpivotRow (you can find this component on Talend Exchange for free) this helps you convert your rows in to columns
I think this may solve your issue...good luck
Hi Rami,
This is a very interesting scenario and I guess you may have to approach the issue as below:
Step :1
Push your output to a file where you include the filepath as one of the columns (like below)
file_path,prod_code,prod_price
C:\filepath\month_jan.txt,1001,100
C:\filepath\month_jan.txt,1002,105
C:\filepath\month_feb.txt,1001,100
C:\filepath\month_feb.txt,1002,105
Step :2
Use a component tUnpivotRow (you can find this component on Talend Exchange for free) this helps you convert your rows in to columns
I think this may solve your issue...good luck
Thank you so much for your help.