Skip to content

Commit d3b75c7

Browse files
fix(ingest/looker): Add flag for Looker metadata extraction
1 parent eceb799 commit d3b75c7

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_mapping_missing = False
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_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)