BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Geo-
Quartz | Level 8

I am using example on:http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#p0bodejpo614gxn1vk...
to using hive sql instead of sas sql

Use implicit pass-through SQL to extract only 10 rows from the newtab table and load the work SAS data set with the results.

proc sql;
connect to hadoop (server=hxpduped);
create table work.a as
select * from connection to hadoop (select * from newtab limit 10);

and the connection information is the case of our school,how should I write a right connection code in sas?

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

If you already have the libname defined, just use it:

libname HAD001 hadoop ... ;

proc sql;
  connect using HAD001;

  create table A as select * from connection to HAD001 (select * from newtab limit 10);

quit;

View solution in original post

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

If you already have the libname defined, just use it:

libname HAD001 hadoop ... ;

proc sql;
  connect using HAD001;

  create table A as select * from connection to HAD001 (select * from newtab limit 10);

quit;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1590 views
  • 1 like
  • 2 in conversation