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.
specifies any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
impalaspecifies the SAS/ACCESS engine name for the Impala interface.
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.
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=
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=
specifies the port number that is used to connect to the specified Impala server.
Default: 21050
specifies the user name.
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=
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=
specifies the Impala schema.
Alias: DATABASE=, DB=
Default: none
specifies the path to the HDFS directory where SAS reads and writes temporary data.
Default: HDFS_TEMPDIR='/tmp'
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.
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.
|
Option |
Default Value |
Valid in CONNECT |
|---|---|---|
|
none |
|
|
|
none |
|
|
|
SERVER= value, if SERVER= is specified; otherwise, none |
|
|
|
50070 (required only if Impala HDFS streaming is running on a nondefault port) |
|
|
|
none |
|
|
|
SHAREDREAD |
● |
|
|
none |
● |
|
|
none |
● |
|
|
FORWARD_ONLY |
● |
|
|
matches the maximum number of bytes per single character of the SAS session encoding |
● |
|
|
none |
|
|
|
none |
● |
|
|
none |
● |
|
|
none |
● |
|
|
DBMS |
● |
|
|
NO |
|
|
|
1024 |
● |
|
|
YES |
|
|
|
NO |
● |
|
|
COMPAT |
|
|
|
0 |
● |
|
|
NO |
● |
|
|
NO |
|
|
|
YES |
|
|
|
CLOUDERA |
● |
|
|
none |
● |
|
|
automatically calculated based on row length |
|
|
|
none |
● |
|
|
0 |
● |
|
|
NONE |
|
|
|
none |
|
|
|
YES |
|
|
|
YES |
|
|
|
0 |
● |
|
|
automatically calculated based on row length |
● |
|
|
NO |
● |
|
|
none |
● |
|
|
none |
||
|
YES |
|
|
|
none |
|
|
|
none |
|
|
|
none |
|
|
|
NO |
● |
|
|
none |
|
|
|
NO |
● |
|
|
none |
● |
|
|
NO |
|
|
|
NO |
● |
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;