I'm just starting to learn Knime. I would like to use Knime to first identify the duplicate records in my table based on email address. Then determine when record of the duplicate will be the surviving record using the created date of the records.
The last step which I'm don't know how to do is create a merging logic. The column "Count" tell me how many time an email exist in my table. If it is 1, then it becsomes the surviving record that I will keep and the rest will be deleted. Before deletion, I would like to merge Phone and Address to the Surviving record if and only if the surviving record phone or address is blank. I do not overwrite existing data on the surviving record.
For example, record 2 phone number should be 111-111-2222 and the address is 11 Second St. after the merging is completed.
Is there a node or a Java snippet that could help me do this? Your help is appreciated.
|Record Id||Phone||Address||Created Date||Count||Label|
|firstname.lastname@example.org||111-111-1111||11 First St.||7/1/2016||1||Surviving|
|email@example.com||11 Second St.||7/20/2016||2||Duplicate|
|firstname.lastname@example.org||11 Third St||8/01/2016||1||Surviving|