From 98ddf5fba3cb2704e857e310c4dcb2ab97759399 Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Tue, 1 Mar 2022 22:18:09 +0530 Subject: [PATCH] Fix #3041: Handled AttributeError (#3042) --- ingestion/src/metadata/ingestion/source/sql_source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/source/sql_source.py b/ingestion/src/metadata/ingestion/source/sql_source.py index 24336ac7538..bae2f166229 100644 --- a/ingestion/src/metadata/ingestion/source/sql_source.py +++ b/ingestion/src/metadata/ingestion/source/sql_source.py @@ -644,7 +644,10 @@ class SQLSource(Source[OMetaDatabaseAndTable]): def _check_col_length(self, datatype, col_raw_type): if datatype and datatype.upper() in {"CHAR", "VARCHAR", "BINARY", "VARBINARY"}: - return col_raw_type.length if col_raw_type.length else 1 + try: + return col_raw_type.length if col_raw_type.length else 1 + except AttributeError: + return 1 def run_data_profiler(self, table: str, schema: str) -> TableProfile: """