Skip to content

Commit 48736a0

Browse files
fix(ingest/looker): Add flag for Looker metadata extraction (#12205)
Co-authored-by: Mayuri Nehate <[email protected]>
1 parent d88e6c9 commit 48736a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

metadata-ingestion/src/datahub/sql_parsing/tool_meta_extractor.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def _get_last_line(query: str) -> str:
4040
class ToolMetaExtractorReport(Report):
4141
num_queries_meta_extracted: Dict[str, int] = field(default_factory=int_top_k_dict)
4242
failures: List[str] = field(default_factory=list)
43+
looker_user_mapping_missing: Optional[bool] = None
4344

4445

4546
class ToolMetaExtractor:
@@ -108,7 +109,9 @@ def extract_looker_user_mapping_from_graph(
108109
PlatformResource.search_by_filters(query=query, graph_client=graph)
109110
)
110111

111-
if len(platform_resources) > 1:
112+
if len(platform_resources) == 0:
113+
report.looker_user_mapping_missing = True
114+
elif len(platform_resources) > 1:
112115
report.failures.append(
113116
"Looker user metadata extraction failed. Found more than one looker user id mappings."
114117
)

0 commit comments

Comments
 (0)