SAS Data Management

SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop, SAS Data Preparation and others
BookmarkSubscribeRSS Feed
SASAna
Quartz | Level 8

Hi SAS users,

 

I am trying to create Table using PROC SQL connecting to Hadoop  to pull the data from hive tables. I am getting memory issue and i  have asked to SET mapreduce.map.memory.mb=6000; in my SAS code. I tried adding it as option and it is erroring .

Can anyone suggest me where and how to use memory setting for Hive data pull's.

 

CONNECT TO HADOOP (user=&user. password=&password. server="XXXX" port=10039 subprotocol=hive2 DBMAX_TEXT=80
30       ! mapreduce.map.memory.mb=6000 );
ERROR: Invalid option name mapreduce.map.memory.mb.

 

Thanks,

Ana

2 REPLIES 2
SASKiwi
PROC Star

I suspect you need to use the PROPERTIES = option like properties = 'MyProperties' as in this link:

http://documentation.sas.com/?docsetId=acreldb&docsetTarget=p0ly2onqqpbys8n1j9lra8qa6q20.htm&docsetV...

 

While the link is for the LIBNAME statement you could try it in a CONNECT statement.

moorsd
Obsidian | Level 7

SASKiwi is correct. You'll need to add the mapreduce option using PROPERTIES. See example below:

 

 

PROPERTIES="hive.fetch.task.conversion=minimal;hive.fetch.task.conversion .threshold=-1";

 

i.e. 

proc sql;
     connect to hadoop ......

        PROPERTIES="hive.groupby.orderby.position.alias=true");

        (
         select X_FACILITY_OFFER_CD,

                   count(*) as count, sum(X_FACILITY_OFFERED_AMT) as X_FACILITY_OFFERED_AMT_SUM,             sum(X_FACILITY_OFFER_SEQ_NO) as X_FACILITY_OFFER_SEQ_NO_SUM

from UC5_TEST3A group by 1 order by 1

);
disconnect from hadoop;

quit;

 

 

The PROPERTIES option can be added on either the libname statement or Hadoop connection string in Explicit pass-through, as you used in your example.

 

 

Also, depending on how the Hadoop environment has been set up, altering the memory for a map task via SAS code may not change the memory for the map task. This could be locked down by the Hadoop administrator. 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1758 views
  • 0 likes
  • 3 in conversation