From 646df78964efdbbeeafbd69a150c4abcbc0cc4a2 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Wed, 16 Nov 2022 17:34:08 -0500 Subject: [PATCH] fix(ingest): mssql - lowercase db name in mssql ingestion (#6448) --- metadata-ingestion/src/datahub/ingestion/source/sql/mssql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/mssql.py b/metadata-ingestion/src/datahub/ingestion/source/sql/mssql.py index 1c8af307f5d5e..a8fc4d0bb413b 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/mssql.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/mssql.py @@ -122,7 +122,7 @@ def __init__(self, config: SQLServerConfig, ctx: PipelineContext): super().__init__(config, ctx, "mssql") # Cache the table and column descriptions self.config: SQLServerConfig = config - self.current_database = None + self.current_database: Optional[str] = None self.table_descriptions: Dict[str, str] = {} self.column_descriptions: Dict[str, str] = {} for inspector in self.get_inspectors(): @@ -262,5 +262,5 @@ def get_identifier( return f"{self.config.database_alias}.{regular}" return f"{self.config.database}.{regular}" if self.current_database: - return f"{self.current_database}.{regular}" + return f"{self.current_database.lower()}.{regular}" return regular