Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6 Chapter 1 • SAS/ACCESS Interface to Hadoop<br />
Examples<br />
• The dbms-name is HADOOP.<br />
• The CONNECT statement is required.<br />
• PROC SQL supports multiple connections to Hadoop. If you use multiple<br />
simultaneous connections, you must use the alias argument to identify the different<br />
connections. If you do not specify an alias, the default HADOOP alias is used.<br />
• The database-connection-arguments for the CONNECT statement are identical to its<br />
LIBNAME connection options on page 3.<br />
This example uses the default Hive port and schema.<br />
proc sql;<br />
connect to hadoop (user="myuser" pw="mypwd" server=hxpduped);<br />
This example explicitly specifies the default Hive port and schema.<br />
proc sql;<br />
connect to hadoop (user="myuser" pw="mypwd"<br />
server=hxpduped port=10000 schema=default);<br />
Passing SAS Functions to Hadoop<br />
SAS/ACCESS Interface to Hadoop passes the following SAS functions to Hadoop for<br />
processing. Where the Hadoop function name differs from the SAS function name, the<br />
Hadoop name appears in parentheses. For more information, see “Passing Functions to<br />
the DBMS Using PROC SQL” in Chapter 5 of SAS/ACCESS for Relational Databases:<br />
Reference.<br />
ABS MAX<br />
ARCOS (ACOS) MIN<br />
ARSIN (ASIN) MINUTE<br />
ATAN MONTH<br />
AVG SECOND<br />
CEIL SIN<br />
COALESCE SQRT<br />
COS STD (STDDEV_SAMP)<br />
COUNT STRIP (TRIM)<br />
DAY SUBSTR<br />
EXP SUM<br />
FLOOR TAN<br />
HOUR TRANSTRN (REGEXP_REPLACE)<br />
INDEX (LOCATE) UPCASE (UPPER)<br />
LOG (LN) VAR (VAR_SAMP)<br />
LOG10 YEAR<br />
LOWCASE (LOWER)<br />
SQL_FUNCTIONS=ALL allows for SAS functions that have slightly different behavior<br />
from corresponding Hadoop functions. Due to incompatibility in date and time functions