diff --git a/ingestion/src/metadata/ingestion/source/dashboard/metabase/client.py b/ingestion/src/metadata/ingestion/source/dashboard/metabase/client.py index 17c3215942a..70d33b4e90d 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/metabase/client.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/metabase/client.py @@ -33,6 +33,7 @@ from metadata.ingestion.source.dashboard.metabase.models import ( MetabaseUser, ) from metadata.utils.constants import AUTHORIZATION_HEADER, NO_ACCESS_TOKEN +from metadata.utils.helpers import clean_uri from metadata.utils.logger import ingestion_logger logger = ingestion_logger() @@ -78,7 +79,7 @@ class MetabaseClient: self.config = config session_token = self._get_metabase_session() client_config: ClientConfig = ClientConfig( - base_url=str(self.config.hostPort)[:-1], # remove trailing slash + base_url=clean_uri(str(self.config.hostPort)), api_version=API_VERSION, auth_header=AUTHORIZATION_HEADER, auth_token=lambda: (NO_ACCESS_TOKEN, 0), diff --git a/ingestion/src/metadata/ingestion/source/pipeline/fivetran/client.py b/ingestion/src/metadata/ingestion/source/pipeline/fivetran/client.py index 5aff2130f27..1640fabe639 100644 --- a/ingestion/src/metadata/ingestion/source/pipeline/fivetran/client.py +++ b/ingestion/src/metadata/ingestion/source/pipeline/fivetran/client.py @@ -20,6 +20,7 @@ from metadata.generated.schema.entity.services.connections.pipeline.fivetranConn FivetranConnection, ) from metadata.ingestion.ometa.client import REST, ClientConfig +from metadata.utils.helpers import clean_uri class FivetranClient: @@ -36,7 +37,7 @@ class FivetranClient: ) client_config: ClientConfig = ClientConfig( - base_url=str(self.config.hostPort), + base_url=clean_uri(str(self.config.hostPort)), api_version="v1", auth_header="Authorization", auth_token=lambda: (api_token[2:-1], 0),