Wednesday, September 25, 2019

Talend ETL - How does tNormalize Component work?

Here, you will learn "How to split a multi valued attributes column into individual rows by using tNormalize?" in Talend Open Studio.


Example -   We are using player data where every player plays multiple games and all the games for that player are stored in Games column in the normalized form.

Id
FirstName
LastName
Games
1
Ryan
Arjun
Baseball, Table Tennis, Cricket, Tennis
2
Kimmy
Wang
Cricket, Tennis, Basketball, Hockey
3
Rosy
Gray
Badminton, Volleyball, Soccer
4
Will
Smith
Tennis, Basketball, Volleyball, Soccer
5
John
Godson
Swimming, Volleyball, Soccer

We want to generate separate row for each game based in Games column for that particular player.
Id
FirstName
LastName
Games
1
Ryan
Arjun
Baseball
1
Ryan
Arjun
Table Tennis
1
Ryan
Arjun
 Cricket
1
Ryan
Arjun
Tennis
2
Kimmy
Wang
Cricket
2
Kimmy
Wang
Tennis
2
Kimmy
Wang
Basketball
2
Kimmy
Wang
Hockey
3
Rosy
Gray
Badminton
3
Rosy
Gray
 Volleyball
3
Rosy
Gray
Soccer
4
Will
Smith
Tennis
4
Will
Smith
 Basketball
4
Will
Smith
Volleyball
4
Will
Smith
Soccer
5
John
Godson
Swimming
5
John
Godson
 Volleyball
5
John
Godson
Soccer

By the help of tNormalize processing component, we can achieve this in Talend Open Studio because tNormalize component splits a record having comma separated values into multiple records. This is useful when data is not organized properly; tNormalize helps to improve data quality which makes ease the data update.



tNormalize processing component helps improve data quality and thus eases the data update and normalizes the input flow following SQL standard. So, this component can be used as intermediate step in a data flow.

tLogRow component allows you to write data, that is flowing through your Job (rows), to the console. Here, we have to connect our tFileInputDelimated_1 component to tLogRow component for showing the data output to the console.

To Learn more, please visit our YouTube channel at - 
http://www.youtube.com/c/Sql-datatools

To Learn more, please visit our Instagram account at -

https://www.instagram.com/asp.mukesh/

To Learn more, please visit our twitter account at -

https://twitter.com/macxima

No comments:

Post a Comment

Popular Posts

Get Sponsored by Big Brands