Configuring Impyla for authentication

You can connect Impyla to the Impala Virtual Warehouse using the HTTP transport protocol and JWT as the authentication mechanism.

  1. 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 
  2. Connect Impyla to the Impala Virtual Warehouse using a connection string as described below:
    • 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.

    • http_transport=True

      The http transport is required by Impala for JWT authentication.

    • jwt=<JWT token>

      Substitute your JWT token, which you copied earlier, for <JWT Token>.

    • http_path="cliservice"


    self.connection = connect(<ENV>.host, <ENV>.http_port, use_http_transport=True,
    timeout=5, jwt=<JWT Token>)
    On the client side, you can now run queries from Impyla on the Impala Virtual Warehouse.