Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

How to do a inner join in SAS Enterprise Miner

Reply
Occasional Contributor
Posts: 7

How to do a inner join in SAS Enterprise Miner

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

New Contributor
Posts: 2

Re: How to do a inner join in SAS Enterprise Miner

Posted in reply to PruthviBhupathiraju

How about open the program editor  and use the SQL procedure?

捕获.JPG

Super User
Posts: 7,832

Re: How to do a inner join in SAS Enterprise Miner

Posted in reply to PruthviBhupathiraju

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;

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Trusted Advisor
Posts: 3,215

Re: How to do a inner join in SAS Enterprise Miner

Posted in reply to PruthviBhupathiraju

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?       

---->-- ja karman --<-----
Trusted Advisor
Posts: 1,228

Re: How to do a inner join in SAS Enterprise Miner

Posted in reply to PruthviBhupathiraju

Hi,

Why you are expecting 38000 records? What if you have multiple records in 40000 dataset for joining key.

Ask a Question
Discussion stats
  • 4 replies
  • 955 views
  • 1 like
  • 5 in conversation