I tried using merge node.But, one data set contained 38,000 records , other data set contained 40,000 records and resultant data set contains 40,000 records. However it should contain 38000 records or less when we do inner join. So can somebody please let me know how to do inner join
We came across this one during our "Jam session" today, and just wanted to offer a minor tweak to the solution given by KurtBremser above (thank you KurtBremser!)... in order to have that data set exported to a subsequent node after the SAS Code node, you can do the following:
proc sort data=A;
by x;
run;
proc sort data=B;
by x;
run;
data &em_export_train;
merge
A (in=in_a)
B (in=in_b)
;
by x;
if in_a and in_b;
run;
How about open the program editor and use the SQL procedure?
Or, in a code node, use (x being your merge variable(s))
proc sort data=A;
by x;
run;
proc sort data=B;
by x;
run;
data C;
merge
A (in=in_a)
B (in=in_b)
;
by x;
if in_a and in_b;
run;
Eminer is for predictive analytics supporting that all in logical steps.
Data preparation should be done as a separate step before. With the Eminer license you get also Eguide and JMP to be able to that.
Of course you can use the eminer code node but why not use tools better suited for the question?
Hi,
Why you are expecting 38000 records? What if you have multiple records in 40000 dataset for joining key.
We came across this one during our "Jam session" today, and just wanted to offer a minor tweak to the solution given by KurtBremser above (thank you KurtBremser!)... in order to have that data set exported to a subsequent node after the SAS Code node, you can do the following:
proc sort data=A;
by x;
run;
proc sort data=B;
by x;
run;
data &em_export_train;
merge
A (in=in_a)
B (in=in_b)
;
by x;
if in_a and in_b;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.