Union Datasets Together Bionic Rule

  • 1
  • Question
  • Updated 2 months ago
  • In Progress
I have two datasets, in which a few of the rows will be identical between the two. I'm trying to create a bionic rule that performs different actions if the row in first dataset matches a row in the other rather than if the row is unique. 

My original thought was to union the two datasets together, transform them and add a counter for how many times the identifying values match. Then I can create actions off of count = 1 vs count > 1. 

But I can't seem to figure out how to union these two datasets together. When I do a merge step, it tries to combine the rows and I can't seem to get them to just union together. They have the same column names.

Is there a way to union two datasets together? Or is there another way anyone can think of to achieve this result?
Photo of Dallis King

Dallis King

  • 608 Points 500 badge 2x thumb

Posted 2 months ago

  • 1
Photo of Dan Ahrens

Dan Ahrens, Gainster (employee)

  • 18,148 Points 10k badge 2x thumb
Hi Dallis. I'm sure there are a couple different ways to tackle this but here is a thought I had. This would involve the type of merge and output field labels. 

Let's say that your data was super simple and just consisted of Account Name and Contact Name

The first step is to look for instances where the data in dataset 1 matches any data in dataset 2. Perform a merge where you "Retain all records from left dataset" (dataset 1 is left, dataset 2 is right), using both fields in the "Map to" criteria.

In the Output Field Label, for dataset 2 check the box for Account Name and rename the field to "Match". If the two datasets match, the Account Name field will have data. If a given row in dataset 1 does not have a match in dataset 2, the Account Name field will be blank. This will give you all records from dataset 1 and indicate if any of those records have a match in dataset 2.

Now we just need to add the records in dataset 2 that did not match. Merge the output of the first merge with dataset 2 and "Retain all records from both datasets", using both fields in the "Map to" criteria. 

You will have kept all records from the first merge, with a field that would identify a match (which could be used later for filtered actions, etc) along with any unmatched records from the second dataset. 

Let me know if this works for you!
Photo of Nitin Pawar

Nitin Pawar, Employee

  • 342 Points 250 badge 2x thumb
Hi Dallis,

We are in process to ship Data Union as new task type. It was planned as part of last release but we could not ship it. 

We will try to ship this asap