Skip to content

Instantly share code, notes, and snippets.

@rajkrrsingh
Created May 28, 2021 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajkrrsingh/866a2d1b812ce2f03f3b9f960eec3184 to your computer and use it in GitHub Desktop.
Save rajkrrsingh/866a2d1b812ce2f03f3b9f960eec3184 to your computer and use it in GitHub Desktop.
Configuring Impyla for CDW Hive LLAP Cluster
import logging
import os
import pandas
from impala.dbapi import connect
from impala.util import as_pandas
logging.basicConfig(level=logging.DEBUG)

HIVE_HS2_HOST='HIVE_HOST_ENDPOINT'
conn = connect(host=HIVE_HS2_HOST,port=443,
               auth_mechanism='PLAIN',user='<workload user>',password='<workload oassword>',use_http_transport=True,http_path='/cliservice',use_ssl=True)
cursor = conn.cursor()
cursor.execute("show databases")
tables = as_pandas(cursor)
tables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment