mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
feat(airflow): respect port parameter if provided (#7945)
This commit is contained in:
parent
bf86235e26
commit
6833494347
@ -58,6 +58,12 @@ class DatahubRestHook(BaseHook):
|
||||
host = conn.host
|
||||
if host is None:
|
||||
raise AirflowException("host parameter is required")
|
||||
if conn.port:
|
||||
if ":" in host:
|
||||
raise AirflowException(
|
||||
"host parameter should not contain a port number if the port is specified separately"
|
||||
)
|
||||
host = f"{host}:{conn.port}"
|
||||
password = conn.password
|
||||
timeout_sec = conn.extra_dejson.get("timeout_sec")
|
||||
return (host, password, timeout_sec)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user