Authenticating from a JDBC client

On the Hive or Impala client side, use the JWT token as a Standard Authorization Bearer token by either specifying it in a JWT environment variable or by specifying the token directly in the JDBC connection string.

Authenticating from a JDBC client requires the following prerequistes:
  • Connect from your client to a Hive or Impala Virtual Warehouse.
You can download the required driver from the Cloudera Data Warehouse Overview page. Click See More from the Resources and Download tile and select the required driver to download.
Specify the JWT token you copied in "Generating a JWT token from the Cloudera side" as a JWT environment variable, and then construct a Beeline command.
Hive example:
export JWT=[***JWT token***]

beeline -u "jdbc:hive2://<your-virtual-warehouse>.<your-environment>.<dwx.company.com>/default;transportMode=http;httpPath=cliservice;ssl=true;retries=3;auth=jwt"
Hive example:
beeline -u "jdbc:hive2://<your-virtual-warehouse>.<your-environment>.<dwx.company.com>/default;transportMode=http;httpPath=cliservice;ssl=true;retries=3;jwt=[***JWT token***]"
You can now query the Virtual Warehouse from the client side.