Hi guys,
Does anyone know how we can connect to hive and hadoop environment using SAS pc?
Thanks
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
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
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
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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.