Fix #3041: Handled AttributeError (#3042)

This commit is contained in:
Mayur Singal 2022-03-01 22:18:09 +05:30 committed by GitHub
parent 374eae4101
commit 98ddf5fba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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:
"""