LIBNAME Statement for the Impala Engine

Overview

This section describes the LIBNAME statement that SAS/ACCESS Interface to Impala supports. For general information about this feature, see LIBNAME Statement for Relational Databases.

Here is the LIBNAME statement syntax for accessing Impala.

For general information about the LIBNAME statement that is not specific to SAS/ACCESS, see LIBNAME Statement in SAS Global Statements: Reference.

Arguments

libref

specifies any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.

impala

specifies the SAS/ACCESS engine name for the Impala interface.

connection-options

provide connection information and control how SAS manages the timing and concurrence of the connection to the DBMS. Here is how these options are specified. When you use the LIBNAME statement, you can connect to the Impala database in two ways. Specify only one of these methods for each connection because they are mutually exclusive.

  • SERVER=, DATABASE=, PORT=, USER=, PASSWORD=
  • DSN=, USER=, PASSWORD=
Note: All of the following connection options are also valid in the CONNECT statement when you use the SQL pass-through facility (SQL procedure) to connect to your DBMS.
SERVER=<'>Impala-server-name<'>

specifies the Impala server name that runs the Impala daemon. If the server name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.

Alias: HOST=

DATABASE=<'>database-name<'>

specifies the Impala database that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.

Alias: DB=

PORT=port

specifies the port number that is used to connect to the specified Impala server.

Default: 21050

USER=<'>Impala-user-name<'>

specifies the user name.

PASSWORD=<'>Impala-password<'>

specifies the Impala password that is associated with your user ID. If it contains spaces or nonalphanumeric characters, you must enclose it in quotation marks. If you do not want to enter your Impala password in uncoded text on this statement, see PROC PWENCODE in the Base SAS Procedures Guide for a method to encode it.

Alias: PASS=, PWD=, PW=

DATASRC=<'>Impala-data-source<'>

specifies the configured Impala ODBC data source to which you want to connect. It is recommended that you use this option only if you have configured Impala ODBC data sources on your client. This method requires additional setup—either through the ODBC Administrator control panel on Windows platforms, or through the odbc.ini file or a similarly named configuration file on UNIX platforms. It is recommended that you use this connection method only if you have existing, functioning data sources that have been specified.

Aliases: DS=, DSN=

SCHEMA=Impala-schema

specifies the Impala schema.

Alias: DATABASE=, DB=

Default: none

HDFS_TEMPDIR='path'

specifies the path to the HDFS directory where SAS reads and writes temporary data.

Default: HDFS_TEMPDIR='/tmp'

CONOPTS=<'> Impala ODBC-connections-options<'>

specifies connection options for your data source or database. Separate multiple options with a semicolon. Refer to your data source or database’s ODBC driver documentation for a list of the ODBC connection options that your ODBC driver supports.

LIBNAME-options

specify how SAS processes DBMS objects. The following table describes the LIBNAME options for SAS/ACCESS Interface to Impala, with the applicable default values. This table also identifies LIBNAME options that are valid in the CONNECT statement in the SQL procedure. For more information, see LIBNAME Options for Relational Databases or SQL Pass-Through Facility.

SAS/ACCESS LIBNAME Options for Impala

Option

Default Value

Valid in CONNECT

ACCESS=

none

AUTHDOMAIN=

none

BL_HOST=

SERVER= value, if SERVER= is specified; otherwise, none

BL_PORT=

50070 (required only if Impala HDFS streaming is running on a nondefault port)

BULKLOAD=

none

CONNECTION=

SHAREDREAD

CONNECTION_GROUP=

none

CONOPTS=

none

CURSOR_TYPE=

FORWARD_ONLY

DBCLIENT_MAX_BYTES=

matches the maximum number of bytes per single character of the SAS session encoding

DBCOMMIT=

none

DBCONINIT=

none

DBCONTERM=

none

DBCREATE_TABLE_OPTS=

none

DBGEN_NAME=

DBMS

DBINDEX=

NO

DBMAX_TEXT=

1024

DBNULLKEYS=

YES

DBPROMPT=

NO

DBSASLABEL=

COMPAT

DBSERVER_MAX_BYTES=

0

DEFER=

NO

DELETE_MULT_ROWS=

NO

DIRECT_SQL=

YES

DRIVER_VENDOR=

CLOUDERA

HDFS_PRINCIPAL=

none

INSERTBUFF=

automatically calculated based on row length

IMPALA_PRINCIPAL=

none

LOGIN_TIMEOUT=

0

MULTI_DATASRC_OPT=

NONE

POST_STMT_OPTS=

none

PRESERVE_COL_NAMES=

YES

PRESERVE_TAB_NAMES=

YES

QUERY_TIMEOUT=

0

READBUFF=

automatically calculated based on row length

REREAD_EXPOSURE=

NO

SCHEMA=

none

SCRATCH_DB=

none

SPOOL=

YES

SQL_FUNCTIONS=

none

SQL_FUNCTIONS_COPY=

none

SQLGENERATION=

none

STRINGDATES=

NO

SUB_CHAR=

none

TRACE=

NO

TRACEFILE=

none

UPDATE_MULT_ROWS=

NO

USE_DATADIRECT=

NO

Impala LIBNAME Statement Examples

This example uses the default Impala port.

libname imp impala server=hxpduped schema=myschema 
   user=myusr1 password=mypwd1;

This example explicitly specifies the default Impala port.

libname imp impala server=hxpduped port=21050 schema=myschema 
   user=myusr1 password=mypwd1;
Last updated: February 3, 2026