Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 6eb39bf

Browse files
ntnhaatjnhat.nguyent
authored andcommitted
fix: update to use pyhive function to get compatible sasl
1 parent 2124423 commit 6eb39bf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dbt/adapters/spark/connections.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,12 +613,11 @@ def build_ssl_transport(
613613
password = "x"
614614

615615
def sasl_factory() -> SASLClient:
616+
from pyhive.hive import get_installed_sasl
616617
if sasl_auth == "GSSAPI":
617-
sasl_client = SASLClient(host, kerberos_service_name, mechanism=sasl_auth)
618+
sasl_client = get_installed_sasl(host, sasl_auth, kerberos_service_name)
618619
elif sasl_auth == "PLAIN":
619-
sasl_client = SASLClient(
620-
host, mechanism=sasl_auth, username=username, password=password
621-
)
620+
sasl_client = get_installed_sasl(host, sasl_auth, username=username, password=password)
622621
else:
623622
raise AssertionError
624623
return sasl_client

0 commit comments

Comments
 (0)