mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-16 18:15:17 +00:00
MINOR: Fix issue with SQLAlchemy types not being correctly mapped to OM Type on the profiler (#16122)
* Fix issue with SQLAlchemy types not being correctly mapped to OM Types on the profiler * Fix checkstyle
This commit is contained in:
parent
215a274bd0
commit
795879d776
@ -168,7 +168,9 @@ class MetricFilter:
|
|||||||
if not isinstance(column, SQALikeColumn):
|
if not isinstance(column, SQALikeColumn):
|
||||||
mapper = converter_registry[service_type]
|
mapper = converter_registry[service_type]
|
||||||
sqa_to_om_types = mapper.map_sqa_to_om_types()
|
sqa_to_om_types = mapper.map_sqa_to_om_types()
|
||||||
om_data_types: Optional[Set] = sqa_to_om_types.get(column.type, None)
|
om_data_types: Optional[Set] = sqa_to_om_types.get(
|
||||||
|
column.type.__class__, None
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
om_data_types = {column.type}
|
om_data_types = {column.type}
|
||||||
|
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class TestSQAProfiler(TestCase):
|
|||||||
|
|
||||||
tables: List[Table] = self.metadata.list_all_entities(Table)
|
tables: List[Table] = self.metadata.list_all_entities(Table)
|
||||||
for table in tables:
|
for table in tables:
|
||||||
if table.name != "users":
|
if table.name.__root__ != "users":
|
||||||
continue
|
continue
|
||||||
table = self.metadata.get_latest_table_profile(table.fullyQualifiedName)
|
table = self.metadata.get_latest_table_profile(table.fullyQualifiedName)
|
||||||
columns = table.columns
|
columns = table.columns
|
||||||
@ -162,7 +162,7 @@ class TestSQAProfiler(TestCase):
|
|||||||
|
|
||||||
tables: List[Table] = self.metadata.list_all_entities(Table)
|
tables: List[Table] = self.metadata.list_all_entities(Table)
|
||||||
for table in tables:
|
for table in tables:
|
||||||
if table.name != "users":
|
if table.name.__root__ != "users":
|
||||||
continue
|
continue
|
||||||
table = self.metadata.get_latest_table_profile(table.fullyQualifiedName)
|
table = self.metadata.get_latest_table_profile(table.fullyQualifiedName)
|
||||||
columns = table.columns
|
columns = table.columns
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user