Skip to content

Commit

Permalink
fix(ingest): correct case of sys views for mssql description population
Browse files Browse the repository at this point in the history
  • Loading branch information
BALyons authored Jun 17, 2022
1 parent 9d7d7de commit e360d26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions metadata-ingestion/src/datahub/ingestion/source/sql/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def _populate_table_descriptions(self, conn: Connection, db_name: str) -> None:
SCHEMA_NAME(T.SCHEMA_ID) AS schema_name,
T.NAME AS table_name,
EP.VALUE AS table_description
FROM SYS.TABLES AS T
INNER JOIN SYS.EXTENDED_PROPERTIES AS EP
FROM sys.tables AS T
INNER JOIN sys.extended_properties AS EP
ON EP.MAJOR_ID = T.[OBJECT_ID]
AND EP.MINOR_ID = 0
AND EP.NAME = 'MS_Description'
Expand All @@ -133,10 +133,10 @@ def _populate_column_descriptions(self, conn: Connection, db_name: str) -> None:
T.NAME AS table_name,
C.NAME AS column_name ,
EP.VALUE AS column_description
FROM SYS.TABLES AS T
INNER JOIN SYS.ALL_COLUMNS AS C
FROM sys.tables AS T
INNER JOIN sys.all_columns AS C
ON C.OBJECT_ID = T.[OBJECT_ID]
INNER JOIN SYS.EXTENDED_PROPERTIES AS EP
INNER JOIN sys.extended_properties AS EP
ON EP.MAJOR_ID = T.[OBJECT_ID]
AND EP.MINOR_ID = C.COLUMN_ID
AND EP.NAME = 'MS_Description'
Expand Down

0 comments on commit e360d26

Please sign in to comment.