Skip to content

Commit

Permalink
[Fix] DRC-717 Recce should support metric and semantic_model nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Huang <kent@infuseai.io>
  • Loading branch information
kentwelcome committed Sep 30, 2024
1 parent c00ac17 commit 4b60437
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions recce/adapter/dbt_adapter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,16 @@ def get_node_name_by_id(self, unique_id):
return self.curr_manifest.sources[unique_id].name
elif unique_id in self.base_manifest.sources:
return self.base_manifest.sources[unique_id].name
elif unique_id.startswith('metric.'):
if unique_id in self.curr_manifest.metrics:
return self.curr_manifest.metrics[unique_id].name
elif unique_id in self.base_manifest.metrics:
return self.base_manifest.metrics[unique_id].name
elif unique_id.startswith('semantic_model.'):
if unique_id in self.curr_manifest.semantic_models:
return self.curr_manifest.semantic_models[unique_id].name
elif unique_id in self.base_manifest.semantic_models:
return self.base_manifest.semantic_models[unique_id].name
else:
if unique_id in self.curr_manifest.nodes:
return self.curr_manifest.nodes[unique_id].name
Expand Down

0 comments on commit 4b60437

Please # to comment.