Skip to content

Commit aa41fc1

Browse files
committed
fix: hive config
1 parent 337c755 commit aa41fc1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎backend/apps/db/db.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,20 @@ def get_driver_connection(ds: CoreDatasource | AssistantOutDsSchema, db_config:
265265
**conn_conf
266266
)
267267
elif equals_ignore_case(ds.type, 'hive'):
268+
if conf.password:
269+
conn_conf['password'] = conf.password
270+
conn_conf['auth'] = 'LDAP'
271+
268272
if not use_pool:
269273
conn = hive.connect(host=conf.host, port=conf.port, username=conf.username, database=conf.database,
270-
password=conf.password if conf.password else None,
271-
auth='LDAP' if conf.password else None, **conn_conf)
274+
**conn_conf)
272275
else:
273276
conn = PooledDB(
274277
creator=hive,
275278
host=conf.host,
276279
port=conf.port,
277280
username=conf.username,
278281
database=conf.database,
279-
password=conf.password if conf.password else None,
280-
auth='LDAP' if conf.password else None,
281282
**conn_conf
282283
)
283284

0 commit comments

Comments
 (0)