Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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