removing duplicated lines by specific rules

Hi Together,

i am quite new in the Knime world and would need your help to create a logic with specific rules for a “simple” duplicate row removal.

I have 4 excel files (Resistors, DaleResistors, Passives and Capacitors) that hold a material column and other columns like MOQ, Pack, Leadtimes etc.

With

Excel Reader Node

Constant Value Column Node

(to add a “Sourcefile” column with the name of the file like “Resistors”)

and Concatenate Node

i combined those 4 files together.

With a Duplicate Row Filter i would be able to identify all duplicated lines by column “Material”.

Now the question is:

I need a way to say

if a duplicate line is from Sourcefile “Passives” use that line and skip the other duplicated lines for that Material.

Else

if a duplicate line is from Sourcefile “Resistors” or “Capacitors” or “DaleResistors” use the first line found and skip the other duplicated lines for that Material.

As i have no clue which nodes are the best to use for that, are you able to help me?

I thought of an Rule Engine Node but i have no clue of programming really.

Thanks for your help

BR

Robert