Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I've created a job which extracts all employee phone numbers from an external database. I have three phone types: Home, Work & Mobile. The issue I have is that some employees have a record for, say, their home number and also for their mobile number, but they contain the same number. So I want to be able to include that number only once.
What I thought would work would be to extract all the data for mobile numbers first & have it create an output, then have the same extract of data again in the next component for the home numbers, but I need to be able to exclude those rows where the combination of person number & phone number has already been created in the first component. Then the same for the last part - extract all the work numbers but exclude those records where the combination of the person and phone number has been extracted in the first two components. Then I want it to create one combined output.
I'm okay with creating each component and then having one output, but I'm struggling with how I would exclude those records already found in the first one or two components.
I hope that makes sense! Thanks in advance for any comments.
@JM39 , compare home phone number with work phone number and populate to work phone number below way.
here all two phone number column data types are integer.
row1.phone_number!=row1.work_number?row1.work_number:null
Thanks very much for the response! I'm not sure how that would work though? I don't have different columns for work, mobile & home numbers. Rather I have one column for the number and then in a different column I have the phone type (work mobile or home). If a person has a home number and a work number then it produces two rows. What I need to do is say, if it produces a row for home number and then the work number is the same, only produce one row (for that person)
@JM39 , can you share sample input and output data?