DATA Step, Macro, Functions and more

SAS access to hadoop

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

SAS access to hadoop

Hi guys,

 

Does anyone know how we can connect to hive and hadoop environment using SAS pc?

 

Thanks


Accepted Solutions
Solution
‎02-13-2018 11:38 AM
Contributor
Posts: 37

Re: SAS access to hadoop

You can Create a library using the ODBC , or you can directly access the table also by connect to odbc option 

libname syntax will be like below 

 

libname name odbc dsn = " " schema=" ";

 

ODBC connection syntax will be like below 

 

proc sql inobs=10;
CONNECT TO ODBC (noprompt= " enter your DSN ; schema= ;");
create table dsn as
select * from connection to odbc
(
SELECT varnames
from table name );
quit;

 

NOTE : accessing the data through ODBC connection is more faster than a Libname 

View solution in original post


All Replies
Solution
‎02-13-2018 11:38 AM
Contributor
Posts: 37

Re: SAS access to hadoop

You can Create a library using the ODBC , or you can directly access the table also by connect to odbc option 

libname syntax will be like below 

 

libname name odbc dsn = " " schema=" ";

 

ODBC connection syntax will be like below 

 

proc sql inobs=10;
CONNECT TO ODBC (noprompt= " enter your DSN ; schema= ;");
create table dsn as
select * from connection to odbc
(
SELECT varnames
from table name );
quit;

 

NOTE : accessing the data through ODBC connection is more faster than a Libname 

Occasional Contributor
Posts: 18

Re: SAS access to hadoop

Posted in reply to soham_sas

what would be the dsn and schema?

I already run my query in hive and I have the result. I'm trying to bring it to SAS

 

Thanks

Contributor
Posts: 37

Re: SAS access to hadoop

DSN is your hadoop/hive server name , and schema is your folder name inside the hadoop/hive 

 

for better clarification , it will be a good option to check with your hadoop/hive admin they will tell you exactly what will be the DSN and Schema for the table which you want to access 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 105 views
  • 1 like
  • 2 in conversation