- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Good day,
I am new to Miner and have the following problem:
I have two datasets. The first dataset has accounts with unique identifiers which then have variables (value etc). The second dataset has most of the unique identifiers from dataset one plus a few new accounts and some of the variables (eg value) have been updated.
What I'm looking to do it to have a merged dataset which contains all of the accounts from both datasets, as well as variables (eg value) for both datasets in separate columns. It will look as follows:
Dataset one Dataset two New dataset
Account Value Account Value Account Value(1) Value(2)
Acc1 10 Acc1 10 Acc1 10 10
Acc2 30 Acc2 25 Acc2 30 25
Acc3 25 Acc3 40 Acc3 25 40
Acc4 5 Acc4 5
Is this possible in Miner and if so can someone please assist?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This would be a standard approach using base SAS (not EM).
Assuming both data sets are sorted:
data want;
merge dataset_one (rename=(value=value1))
dataset_two (rename=(value=value_2));
by account;
run;
I'm not sure how you rename fields in EM, but there must be a way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You should be able to use the Merge node in EM for this. Just be sure to set the Merging property to Match, select Account as a By Ordering variable, set Overwrite Variables property to No, and any variables that are named the same in both data sets need to be flagged with No for Overwrite Variable in the Edit Variables window.