columns to rows in talend spark Job

Highlighted
Moderator

columns to rows in talend spark Job

Hi,

 

How we will Convert columns to rows in talend spark Job,since tUnpivot component is not supporting in Talend BigData Batch jobs

 

Input:-

Id;Name;Sex;Surgery
1;Shong;M;Y
2;Ross;M;Y
3;Elise;F;N

Output:-

 

Id;Question;Answer
1;Name;Shong
1;Sex;M
1;Surgery;Y
2;Name;Ross
2;Sex;M
2;Surgery;Y
3;Name;Elise
3;Sex;F
3;Surgery;N

 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Employee

Re: columns to rows in talend spark Job

Hi Manohar,

 

    Could you please try to run it as a combination of Standard and Bigdata jobs where the standard job will do the unpivoting?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

Highlighted
Moderator

Re: columns to rows in talend spark Job

Hi Nikhil,

 

I need to build as a stand alone job? and that too it huge data almost in TB's.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Employee

Re: columns to rows in talend spark Job

Hmm... Can we create some custom code in that case and call from Bigdata batch job as routine?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

Highlighted
Sixteen Stars
Sixteen Stars

Re: columns to rows in talend spark Job

You can do it within tMap:

tmap.png


TRF
Highlighted
Moderator

Re: columns to rows in talend spark Job

Hi Nikhil,
Can you share the java code?
Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Employee

Re: columns to rows in talend spark Job

Hi Manohar,

 

     Unfortunately I am travelling for next couple of days and may not get time to create the custom code :-( 

 

     Could you please try @TRF 's suggestion?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Highlighted
Sixteen Stars
Sixteen Stars

Re: columns to rows in talend spark Job

@manodwhb, did it work?

Don't forget to give kudos/accept the solution when a replay is helpful (ha ha !)


TRF
Highlighted
Moderator

Re: columns to rows in talend spark Job

@TRF @nikhilthampi ,With @TRF ,solution it will not work out ,since my target is DB and do not want to generate a file or i do not want to use tExtractDelimitted column.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now