Superset怎么设置连接hive的地址可以指定用户名和密码?

HMS Core 能力速配,唱响恋爱进行曲>>>

superset怎么连hive hive显式设置了用户名和密码

Python连hive 可以通过如下代码来连

from pyhive import hive

host_name = "192.168.0.38"
port = 10000
user = "admin"
password = "password"
database="test_db"

def hiveconnection(host_name, port, user,password, database):
    conn = hive.Connection(host=host_name, port=port, username=user, password=password,
                           database=database, auth='CUSTOM')
    cur = conn.cursor()
    cur.execute('select item_sk,reason_sk, account_credit from returns limit 5')
    result = cur.fetchall()

    return result

但是 Superset连hive 这个地址怎么设置呢 可以指定用户名和密码

hive://hive@{hostname}:{port}/{database}

回答

hive://username:password@hostname:port/database?auth=CUSTOM

https://github.com/apache/superset/discussions/18699#discussioncomment-2170334