Establishing a Connection
The objects available within our connector are accessible from the "cdata.apacheimpala" module. In order to use the module's objects directly, the module must first be imported as below:
import cdata.apacheimpala as mod
From there, the connect() method can be called from the connector object to establish a connection using an appropriate connection string, such as the below:
Connecting to Apache Impala
In order to connect to Apache Impala, set the Server, Port, and ProtocolVersion. You may optionally specify a default Database.
Authenticating to Apache Impala
There are several ways to authenticate to Apache Impala including NOSASL,LDAP,KERBEROS. The following sections cover how to connect over each.
Authenticating with NOSASL
When using NOSASL, no authentication is performaned. It is used when you are connecting to a server from a trusted location such as a test machine on your local network. By default, NOSASL is as the default AuthScheme, so no additional connection properties need to be set.
Authenticating with LDAP
To authenticate with LDAP, set the following connection properties:
- AuthScheme: Set this to LDAP.
- User: Set this to user to login as.
- Password: Set this to the password of the user.
Authenticating with Kerberos
Please see Using Kerberos for details on how to authenticate with Kerberos.
Securing Apache Impala Connections
To enable TLS/SSL in the provider, set UseSSL to True.