One Star

How to split columns to rows dynamically

Dear all,
i am newbie in Talend Community and i would like to achieve a dynamic split of columns to rows.
We have the following Excel, which would need to be splitted:
Excel Input (headers & data)
DateKey/TimeInterval/Germany/France
11.08.2016/00-01/10/20
Output (headers & data):
DateKey/TimeInterval/CountryName/Value
11.08.2016/00-01/Germany/10
11.08.2016/00-01/France/20
So basically i am transposing (unpivoting) the Country part, with the value. I have found out that the "tSplitRow_1" does the trick, but it is not dynamic. Just to elaborate the Country part is of course dynamic, apart from "Germany" and "France" could be any other one, also the sequence of the Countries can be different.
Are there in Talend any other components that would help me achieve my goal or must java code be embedded? If you have any examples in this respect i would also appreciate it.
Thank you and cheers,
Peter
6 REPLIES
One Star

Re: How to split columns to rows dynamically

That's what tNormalize is supposed to do. Never used it myself.
gl !

Note : it's not exactly what it does because your case if very uncommon. You're asking for a dynamic schema and I really don't know if it's possible.
Edit 2 : http://bekwam.blogspot.fr/2011/06/dynamic-schemas-in-talend-open-studio.html
That's what I thought : you need Java to do that.
One Star

Re: How to split columns to rows dynamically

One Star

Re: How to split columns to rows dynamically

Hi IBashar,
thank you for your answer, yes indeed java development would be needed. Did you attach the zip, since i cannot reach it/download it.
Thanks & regards.
One Star

Re: How to split columns to rows dynamically

Hi
I did, no idea why it didn't work. I'm at home atm, don't have the zip. I'll try again monday.
One Star

Re: How to split columns to rows dynamically

Updated my post, the upload seems to have worked this time.
It's from a version 6 Talend btw.
One Star

Re: How to split columns to rows dynamically

Hi IBashar,
i have the same problem as Nitewalkr and tried to import your sandbox project in Talend 6.2, but i didn't managed it. Do you have a hint for me how I can use your sandbox project?
Thanks & regards