Skip to content

Instantly share code, notes, and snippets.

@developer-sdk
Created August 18, 2023 23:48
Show Gist options
  • Save developer-sdk/ac3528361e0a96d718e355bc684c64ba to your computer and use it in GitHub Desktop.
Save developer-sdk/ac3528361e0a96d718e355bc684c64ba to your computer and use it in GitHub Desktop.
pyhive 커버로스 예제
from pyhive import hive
from TCLIService.ttypes import TOperationState
conn = hive.connect(host='test.com',
port=10000,
database='default',
auth='KERBEROS',
username='hive_user',
kerberos_service_name='hive').cursor()
cursor = conn.cursor()
cursor.execute("show databases")
for r in cursor.fetchall():
print(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment