CData Python Connector for Apache Impala

Build 21.0.7930

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:

mod.connect("Server=127.0.0.1;Port=21050;")

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.
To authenticate, set User, Password, and AuthScheme. If the LDAP server enables the Unauthenticated Authentication Mechanism of Simple Bind, the Password is optional instead of required.

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.

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 21.0.7930