Configuring Impyla for authentication
You can connect Impyla to the Impala Virtual Warehouse using the HTTP transport protocol and JWT as the authentication mechanism.
In a terminal window, as a client, you run the command provided by the Impala
Virtual Warehouse owner to update Impyla to the version compatible with the
Impala Virtual Warehouse.
pip install impyla==0.18.0
Connect Impyla to the Impala Virtual Warehouse using a connection string as
- host=Name of your Virtual Warehouse host
- port=Virtual Warehouse port
- use ssl=true
CDW only provides a TLS endpoint, it does not provide an unencrypted endpoint. Also, not using TLS will expose the JWT in plain text.
The http transport is required by Impala for JWT authentication.
- jwt=<JWT token>
Substitute your JWT token, which you copied earlier, for <JWT Token>.
self.connection = connect(<ENV>.host, <ENV>.http_port, use_http_transport=True, http_path="cliservice", auth_mechanism="JWT", timeout=5, jwt=<JWT Token>)On the client side, you can now run queries from Impyla on the Impala Virtual Warehouse.