From 954b827e36d7765c74ab10ca781706fb11377875 Mon Sep 17 00:00:00 2001 From: Isaac Dimalen <> Date: Tue, 21 May 2024 13:27:13 +1200 Subject: [PATCH] Add "krb_host" as a config option --- dbt/adapters/hive/connections.py | 2 ++ tests/conftest.py | 1 + 2 files changed, 3 insertions(+) diff --git a/dbt/adapters/hive/connections.py b/dbt/adapters/hive/connections.py index 5383575..751e722 100644 --- a/dbt/adapters/hive/connections.py +++ b/dbt/adapters/hive/connections.py @@ -65,6 +65,7 @@ class HiveCredentials(Credentials): use_http_transport: Optional[bool] = True http_path: Optional[str] = None kerberos_service_name: Optional[str] = None + krb_host: Optional[str] = None usage_tracking: Optional[bool] = True # usage tracking is enabled by default _ALIASES = {"pass": "password", "user": "username"} @@ -226,6 +227,7 @@ def open(cls, connection): port=credentials.port, auth_mechanism="GSSAPI", kerberos_service_name=credentials.kerberos_service_name, + krb_host=credentials.krb_host, use_http_transport=credentials.use_http_transport, use_ssl=credentials.use_ssl, ca_cert=credentials.ca_cert, diff --git a/tests/conftest.py b/tests/conftest.py index 4a5b26f..46612c3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -63,6 +63,7 @@ def cdh_kerberos_target(): "port": int(os.getenv("DBT_HIVE_PORT")), "schema": os.getenv("DBT_HIVE_SCHEMA") or "dbt_adapter_test", "kerberos_service_name": os.getenv("DBT_HIVE_KERBEROS_SERVICE_NAME") or "hive", + "krb_host": os.getenv("DBT_HIVE_KRB_HOST") or None, "use_http_transport": bool(strtobool(os.getenv("DBT_HIVE_USE_HTTP_TRANSPORT") or "f")), "use_ssl": bool(strtobool(os.getenv("DBT_HIVE_USE_SSL") or "f")), "ca_cert": os.getenv("DBT_CA_CERT") or None,