diff --git a/ingestion/src/metadata/ingestion/source/dashboard/looker/columns.py b/ingestion/src/metadata/ingestion/source/dashboard/looker/columns.py index 7d00b92b016..e56f2fe341a 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/looker/columns.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/looker/columns.py @@ -96,11 +96,14 @@ def get_columns_from_model( columns = [] all_fields = (model.fields.dimensions or []) + (model.fields.measures or []) for field in cast(Sequence[LookmlModelExploreField], all_fields): + type_ = LOOKER_TYPE_MAP.get(field.type, DataType.UNKNOWN) columns.append( Column( name=field.name, displayName=getattr(field, "label_short", field.label), - dataType=LOOKER_TYPE_MAP.get(field.type, DataType.UNKNOWN), + dataType=type_, + # We cannot get the inner type from the sdk of .lkml + arrayDataType=DataType.UNKNOWN if type_ == DataType.ARRAY else None, dataTypeDisplay=field.type, description=field.description, ) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py b/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py index e3ce9c3cc88..a6df6e19a30 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py @@ -724,7 +724,9 @@ class LookerSource(DashboardServiceSource): displayName=chart.title or chart.id, description=self.build_chart_description(chart) or None, chartType=get_standard_chart_type(chart.type).value, - sourceUrl=f"{clean_uri(self.service_connection.hostPort)}/dashboard_elements/{chart.id}", + sourceUrl=chart.query.share_url + if chart.query is not None + else f"{clean_uri(self.service_connection.hostPort)}/merge?mid={chart.merge_result_id}", service=self.context.dashboard_service.fullyQualifiedName.__root__, ) self.status.scanned(chart.id) diff --git a/ingestion/tests/unit/topology/dashboard/test_looker.py b/ingestion/tests/unit/topology/dashboard/test_looker.py index cefa0ce7e45..41bb91dcc82 100644 --- a/ingestion/tests/unit/topology/dashboard/test_looker.py +++ b/ingestion/tests/unit/topology/dashboard/test_looker.py @@ -100,7 +100,9 @@ MOCK_DASHBOARD_ELEMENTS = [ body_text="Some body text", note_text="Some note", type="line", - query=Query(model="model", view="view"), + query=Query( + model="model", view="view", share_url="https://my-looker.com/hello" + ), ) ] @@ -365,7 +367,7 @@ class LookerUnitTest(TestCase): displayName="chart_title1", description="subtitle; Some body text; Some note", chartType=ChartType.Line, - sourceUrl="https://my-looker.com/dashboard_elements/chart_id1", + sourceUrl="https://my-looker.com/hello", service=self.looker.context.dashboard_service.fullyQualifiedName.__root__, )