[resolved] Job : Transposing rows to Columns

One Star

[resolved] Job : Transposing rows to Columns

Hello everyone,
I have a big problem on Talend.
I have an Excel file with several columns, I would transpose the second part of the file and keep the first as it is.
Please find attached the example print-screen and my job.
I tried to used the Split component, the problem with this component are manually changes line by line.
it does not work if you have a lot of line.
How to please is very urgent.
Sincerely yours.

Accepted Solutions
Five Stars

Re: [resolved] Job : Transposing rows to Columns

Hi 
you can do achieve it with help of tNormalize component but you job design should be like below. 
tFileinput---tMap---tNormalize1---tBufferout1
\------tNormalize2---tBufferout2
|---tNormalize3---tBufferout3

now follow the steps.

in tMap create three ouput links. 
add source columns till CA_14 then concatenate CA columns in one column named as CA_14. e.g. ca 14_0+"|"+ca 14_2+"|"+ca 14_3, 
do the same in rest of the two output links for BU and KG 
then configure tNormalize component with source respective column like CA_14 for first, KG_14 for second, BU_14 for third normalize component with "\\|" delimiter string. 
you will get six rows for each then Marge all the three flow don the line to get the result.

All Replies
Four Stars

Re: [resolved] Job : Transposing rows to Columns

Hi,
Not able to understand what is the problem... but using tMap is very simple... based on first screenshot, what you are doing is just picking up few columns from input and sending it to output...
tFileInputExcel-->tMap--->tLogRow---->tFileOutputDelimited
Vaibhav
Moderator

Re: [resolved] Job : Transposing rows to Columns

Hislim025,


Could you please elaborate your case with an example with input and expected output values?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: [resolved] Job : Transposing rows to Columns

Hi 
you can do achieve it with help of tNormalize component but you job design should be like below. 
tFileinput---tMap---tNormalize1---tBufferout1
\------tNormalize2---tBufferout2
|---tNormalize3---tBufferout3

now follow the steps.

in tMap create three ouput links. 
add source columns till CA_14 then concatenate CA columns in one column named as CA_14. e.g. ca 14_0+"|"+ca 14_2+"|"+ca 14_3, 
do the same in rest of the two output links for BU and KG 
then configure tNormalize component with source respective column like CA_14 for first, KG_14 for second, BU_14 for third normalize component with "\\|" delimiter string. 
you will get six rows for each then Marge all the three flow don the line to get the result.