Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "krb_host" as a config option #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dbt/adapters/hive/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down