Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Prakhar1
Creator III
Creator III

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.

Labels (2)
1 Reply
Anonymous
Not applicable

Hi,

 

    I believe you are looking for below solution.

0683p000009M6x0.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.

0683p000009M6wX.png

 

0683p000009M6Xl.png

 

0683p000009M6xA.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.

0683p000009M6xF.png

 

0683p000009M6xK.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