Merge rows (cross join)

One Star

Merge rows (cross join)

Hello,
I have the following rows in a file:
Ultrahouse|41|40|1
Megahouse|42|41|2
Superhouse|43|42|3
House|44|43|4
Now i want to use Talend to merge the 4 rows into one like this:
Ultrahouse>Megahouse>Superhouse>House
Thanks
Mr Marui Lamakamapa
Head of Talend Integration
Four Stars

Re: Merge rows (cross join)

Use tMemorizeRows component...
tFileInputDelimited-->tMemorizeRows-->tJavaRow-->tfileoutDelimited
Refer to post - http://www.talendforge.org/forum/viewtopic.php?id=35034 which has similar logic but for different purpose.
Thanks
Vaibhav
One Star

Re: Merge rows (cross join)

Hi ,
Use tDenormalize component.
Thanks,
aishu
One Star

Re: Merge rows (cross join)

Hi ,
tDenormalize component Link: http://www.vikramtakkar.com/2013/01/understanding-tnormalize-and.html
Thanks,
kumar
One Star

Re: Merge rows (cross join)

Unfortunaletyl I dont work with tDenormalize it seems the cross join dont work.
With memorize row I tried but it doesnt work.
Mr Marui Lamakamapa
Four Stars

Re: Merge rows (cross join)

tMemorizeWorks, you will have to do some tweaking... check the screenshot, used following expression in tjavarow with first column to memorize for 4 times.
output_row.a = a_tMemorizeRows_1+">"+a_tMemorizeRows_1+">"+a_tMemorizeRows_1+">"+a_tMemorizeRows_1;
Vaibhav
One Star

Re: Merge rows (cross join)

Now I realize solution
Thanks to sanvaibhav I was able to do with tMemorice
Thank you alot sanvaibhav
Well support in this forum!
Mr Marui Lamakamapa
Five Stars

Re: Merge rows (cross join)

create a job like below
read yourinput-----main-->tDenormalize----main---youroutput
now you have to do some changes in tDenormalize components schema take only one column as above your first column for de-normalization.
and map only column to your out put it will give you expected result i have just tested with your given input.