fix(ingest/looker): Add flag for Looker metadata extraction (#12205)

Co-authored-by: Mayuri Nehate <33225191+mayurinehate@users.noreply.github.com>
This commit is contained in:
sagar-salvi-apptware 2024-12-25 00:57:27 +05:30 committed by GitHub
parent d88e6c9977
commit 48736a03dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,6 +40,7 @@ def _get_last_line(query: str) -> str:
class ToolMetaExtractorReport(Report):
num_queries_meta_extracted: Dict[str, int] = field(default_factory=int_top_k_dict)
failures: List[str] = field(default_factory=list)
looker_user_mapping_missing: Optional[bool] = None
class ToolMetaExtractor:
@ -108,7 +109,9 @@ class ToolMetaExtractor:
PlatformResource.search_by_filters(query=query, graph_client=graph)
)
if len(platform_resources) > 1:
if len(platform_resources) == 0:
report.looker_user_mapping_missing = True
elif len(platform_resources) > 1:
report.failures.append(
"Looker user metadata extraction failed. Found more than one looker user id mappings."
)