I have an excel input file with customer names, and I am trying to generate sequence numbers. This is what I am getting right now
But the output I want is as follows:
You'll probably need to read in the Customer Name data rows as a pre-step, get the unique customer names, generate the sequence from the unique list, then use tMap, to join the list of unique values and customer name back into the source:
1/ excel -> tuniq -> tJavaRow (generate sequence) -> hash or fileoutput
2/ excel -> tmap (join in hash or file from step one) -> output
I have just provided sample data, there are multiple customers with same name. Some of the customers have repeated 18 times.
Yup, and when you feed those through the tUniqRow, they will get resolved down to one row:
You then generate the the sequence for these unique names.
Unless I'm completely missing what you're after.
Yup, as per my original reply, step 1 - you get the unique customer names, generate the sequence on those, save into a hash or output file (lets call this unique customer sequences), step 2 - re-read the source data and join in the unique customer sequences.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables