Joining rules using ANY on one type, but ALL on another

Hi,

I’m doing a join of two sets of data, and struggling for the following reason:

There are three points of contact which can be connected in data set, so data set 1 ‘email’ is set to match ‘any’ of data set 2s ‘email 1’, ‘email 2’, or ‘email 3’.

However, in that same join I need to connect DS 1 ‘Enquiry Date’ to DS 2 ‘date_enquired’, but as I have selected ‘Any of the following’ to cater for the emails, this means it’s not working with the enquiry date. Is there a way to have the joiner’s matching criteria set to have ‘any’ with the emails, but ‘all’ with the dates?

Hello @BSLsteve,

don’t think this is possible inside Joiner node but workaround can be to use Joiner node only with email columns followed by Rule-based Row Filter node where you’ll remove rows where enquiry dates are not equal.

Br,
Ivan

Thank you. I’m not sure that will work in this case though, as it contains repeat customers - so email addresses will appear multiple times with different dates. For example:

DS 1

email@example .com Enquiry Date is 10/10/2020
email@example .com Enquiry Date is 01/08/2022
email@example .com Enquiry Date is 05/06/2025

DS2:

email@example .com date_enquired is 10/10/2020
email@example .com date_enquired is 01/08/2022
email@example .com date_enquired is 05/06/2025

And there are of course many other emails with similar. So I am hoping to connect the email addresses together, along with their corresponding dates.

A bit lazy currently for doing an example (or better say data sets) to check my idea but should work. At least in my head. You can either give it a try on your data sets or if you create two sample (dummy) data set I can create workflow to check and share if it works.

Br,
Ivan

Thank you so much, that is really kind. How is this for dummy data to test it?

Data Set 1

email Enquiry Date
email@example .com 10/10/2020
email@example .com 01/08/2022
email@example .com 05/06/2025
test@testing .com 10/10/2020
test@testing .com 03/08/2022
data@random .co.uk 03/08/2022
data@random .co.uk 05/06/2025
data@random .co.uk 05/06/2024
noemail-match@example .com 05/06/2024
noemail-match@example .com 10/10/2020

Data Set 2:

email 1 email 2 email 3 date_enquired
email@example .com 10/10/2020
madeup@email. org email@example .com 01/08/2022
email@example .com 05/06/2025
test@testing .com 10/10/2020
madeup@email. org another@none. Net test@testing .com 03/08/2022
data@random .co.uk 03/08/2022
madeup@email. org data@random .co.uk 05/06/2025
test@testing .com lastcolumn@not .net data@random .co.uk 05/06/2024
differentemail@example .com unused@unused .co.uk 05/06/2024
mismatch@notthisone .com no-datematch@test .com 17/07/2023

Data set looks just fine. As long as you know what output you expect :grinning_face:

This is workflow design. I used Row to Column Names just to have proper column names from your data set. Otherwise you won’t need them. And her is workflow attached.

joinerAnyExample_ipazin.knwf (80.3 KB)

Check it out and let me know is this what you were looking for.

Br,
Ivan

3 Likes

Thank you, this is really kind of you - I will try it out now :slight_smile:

1 Like

It works! Thank you so very much. May I ask one further thing… is there a way, to de-duplicate when a row matches both email and date… so it will leave the enquiries made by the same person on different dates, but reduce to one enquiry if one person made multiple on the same date?

1 Like

Glad it works. For deduplication check Duplicate Row Filter node.
Br,
Ivan

2 Likes