I want to search for certain Product-IDs within each Customer-ID. Based on which Product-IDs (only A or only B or the combination of A&B etc.) the customer has bought, the customer should get a certain calssification (Basket-Code).
Example:
Could please somebody help me? Are there any nodes made for such classifications?
Thank you!
Hi @peter_b and welcome to the KNIME community forum,
Do you want to label the customers based on if they have bought product A, or B or both?
E.g.:
A&B=> Type-1
A=> Type-2
B=> Type-3
Or
A&B=> Type-1
A=> Type-2
B=> Type-2
Is that right?
You can filter the rows based on these products (optional) and then use a GroupBy node to concatenate the products for each unique customer and finally check the conditions in a Rule Engine node by applying the “? MATCHES ?” function.
Hi @armingrudd,
thank you for your fast reply! Yes, that’s alsmost what i need:)
And yes, it should be always a different Type, BUT independent of the order of the letters.
E.g.:
A => Type-1
B => Type-2
A&B => Type-3
B&A => Type-3
etc…
AND: To Add the “Type-X” as a column to the origin table for each Customer-ID, i would use a “Join” node with an inner-join on Customer ID, right?