diff --git a/docs/lineage/airflow.md b/docs/lineage/airflow.md index 2e584b8ce0d24c..d501ea407c0728 100644 --- a/docs/lineage/airflow.md +++ b/docs/lineage/airflow.md @@ -45,6 +45,8 @@ Set up a DataHub connection in Airflow, either via command line or the Airflow U airflow connections add --conn-type 'datahub-rest' 'datahub_rest_default' --conn-host 'http://datahub-gms:8080' --conn-password '' ``` +If you are using hosted Acryl Datahub then please use `https://YOUR_PREFIX.acryl.io/gms` as the `--conn-host` parameter. + #### Airflow UI On the Airflow UI, go to Admin -> Connections and click the "+" symbol to create a new connection. Select "DataHub REST Server" from the dropdown for "Connection Type" and enter the appropriate values. diff --git a/metadata-ingestion-modules/airflow-plugin/tests/unit/test_airflow.py b/metadata-ingestion-modules/airflow-plugin/tests/unit/test_airflow.py index 75b6f85b27bc12..c88f4d77b7aebd 100644 --- a/metadata-ingestion-modules/airflow-plugin/tests/unit/test_airflow.py +++ b/metadata-ingestion-modules/airflow-plugin/tests/unit/test_airflow.py @@ -41,13 +41,13 @@ datahub_rest_connection_config = Connection( conn_id="datahub_rest_test", conn_type="datahub_rest", - host="http://test_host:8080/", + host="http://test_host:8080", extra=None, ) datahub_rest_connection_config_with_timeout = Connection( conn_id="datahub_rest_test", conn_type="datahub_rest", - host="http://test_host:8080/", + host="http://test_host:8080", extra=json.dumps({"timeout_sec": 5}), ) diff --git a/metadata-ingestion/src/datahub/emitter/rest_emitter.py b/metadata-ingestion/src/datahub/emitter/rest_emitter.py index d4e974d5855178..8baa8481ea4f73 100644 --- a/metadata-ingestion/src/datahub/emitter/rest_emitter.py +++ b/metadata-ingestion/src/datahub/emitter/rest_emitter.py @@ -10,7 +10,7 @@ from requests.adapters import HTTPAdapter, Retry from requests.exceptions import HTTPError, RequestException -from datahub.cli.cli_utils import get_system_auth +from datahub.cli.cli_utils import fixup_gms_url, get_system_auth from datahub.configuration.common import ConfigurationError, OperationalError from datahub.emitter.generic_emitter import Emitter from datahub.emitter.mcp import MetadataChangeProposalWrapper @@ -72,7 +72,7 @@ def __init__( ): if not gms_server: raise ConfigurationError("gms server is required") - self._gms_server = gms_server + self._gms_server = fixup_gms_url(gms_server) self._token = token self.server_config: Dict[str, Any] = {}