I have a table having columns
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
So, any one can help how could i perform this in talend.
I believe you are looking for below solution.
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.
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.
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 :-)
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
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend