Acknowledged

Union Datasets Together Bionic Rule

  • 9 January 2018
  • 7 replies
  • 61 views

Userlevel 4
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?

7 replies

Userlevel 7
Badge +1
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!
Userlevel 2
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

Thanks,
Nitin
Is there any update on when Data Unions will be available? Your post was 5 months ago and I don't think this feature is available yet.
Userlevel 6
Badge +1
Nitin and team, any updates on Union task type within Bionic Rules? I have a solid use case for Union: I conducted a survey for the first half of 2018, and now I'm conducting an almost identical survey for the second half of 2018, and I want to bring in rows from each survey (but not Merge or Join them).
Userlevel 2
Like Matthew, I have a great use case for this. We have several datasets where we can grab customers/users from when we need them. If I try to grab them in a Bionic Query as part of a Program, there's no way to merge them together if a contact exists in one set and not another. I have to create a new MDA object, write to it twice using the different data sets, and then load that one object to the NPS Survey Program.

Userlevel 7
Badge +1

@nitin_pawar : Where are we on allowing the union of data sets? This is a very valid use case and is extremely limiting to any customer trying to combine two datasets together when there is no match on ids. This is especially limiting to JO where such queries are commonplace. 

Userlevel 2

@meenal_shukla , 

sent you note on slack for this 

Reply