From 9025bfb8d08e6c534f057b8c7ef0362cf2dd9779 Mon Sep 17 00:00:00 2001 From: mayurinehate <33225191+mayurinehate@users.noreply.github.com> Date: Thu, 17 Mar 2022 00:06:23 +0530 Subject: [PATCH] fix(ingest): extract redshift platform correctly from sqlalchemy uri (#4421) * fix(ingest): extract redshift platform from sqlalchemy uri --- .../src/datahub/ingestion/source/sql/sql_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py index fbbdf93b7e0b10..bed10be9b39fea 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py @@ -102,8 +102,8 @@ def get_platform_from_sqlalchemy_uri(sqlalchemy_uri: str) -> str: if sqlalchemy_uri.startswith("mssql"): return "mssql" if ( - sqlalchemy_uri.startswith("jdbc:postgres:") - and sqlalchemy_uri.index("redshift.amazonaws") > 0 + sqlalchemy_uri.startswith(("jdbc:postgres:", "postgresql")) + and sqlalchemy_uri.find("redshift.amazonaws") > 0 ) or sqlalchemy_uri.startswith("redshift"): return "redshift" if sqlalchemy_uri.startswith("snowflake"):