Talend Data Integration each row loop operation

Five Stars

Talend Data Integration each row loop operation

Hi,

I have a table having columns 

id|f_name|l_name|email_id

1|abc|xyz|null

2|def|mno|null

3|abc|xyz|null

 

I want to process this table and generate email address for each employees.

If 2 employees have same f_name and l_name then the email address should be like

abc.a.xyz@gmail.com

abc.b.xyz@gmail.com

 

So, any one can help how could i perform this in talend.

Employee

Re: Talend Data Integration each row loop operation

Hi,

 

    I believe you are looking for below solution.

image.png

 

The first subjob's role is to find the unique name combinations and find the count for each combination. It will be stored to a tHashOutput.

image.png

 

image.png

 

image.png

 

The second subjob will sort the data based on name and will do a lookup with unique name count. If the count is more than 1, it will add additional logic to add character else it will be a combination of first name and last name.

image.png

 

image.png

 

The rule which converts the sequence of number to corresponding alphabet is as shown below.

 

row4.unique_count==1?  
row5.f_name+"."+row5.l_name+"@gmail.com"
:row5.f_name+"."+String.valueOf((char)(Numeric.sequence(row4.full_name,1,1) + 96))+"."+row5.l_name+"@gmail.com" 

The sequence is named after full name. So for each full name combination, the sequence will get automatically reset. 

 

I hope I have answered your query. Please add additional checks to make sure that first name and last name columns are not null. Could you please spare a second to mark the topic as resolved? Kudos will be a bonus from your end :-)

 

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

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog