Created
August 18, 2023 23:48
-
-
Save developer-sdk/ac3528361e0a96d718e355bc684c64ba to your computer and use it in GitHub Desktop.
pyhive 커버로스 예제
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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