From cfca795edfd9722a07cb2bb7182d02fee168018c Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Tue, 25 Jan 2022 22:12:37 +0530 Subject: [PATCH] ISSUE-2422: Handled None datatype (#2423) Co-authored-by: Mayur SIngal --- ingestion/src/metadata/ingestion/source/sql_source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/sql_source.py b/ingestion/src/metadata/ingestion/source/sql_source.py index e4f91ae2a69..6f6e4c3abda 100644 --- a/ingestion/src/metadata/ingestion/source/sql_source.py +++ b/ingestion/src/metadata/ingestion/source/sql_source.py @@ -506,7 +506,7 @@ class SQLSource(Source[OMetaDatabaseAndTable]): col_data_length = self._check_col_length( col_type, column["type"] ) - if col_type == "NULL": + if col_type == "NULL" or col_type is None: col_type = "VARCHAR" data_type_display = "varchar" logger.warning( @@ -567,7 +567,7 @@ class SQLSource(Source[OMetaDatabaseAndTable]): return None def _check_col_length(self, datatype, col_raw_type): - if datatype.upper() in { + if datatype is not None and datatype.upper() in { "CHAR", "VARCHAR", "BINARY",