Skip to content

Commit

Permalink
Merge pull request #435 from DataRecce/feature/drc-717-bug-recce-summ…
Browse files Browse the repository at this point in the history
…ary-failed-due-to-semantic-model

[Fix] DRC-717 Recce should support `metric` and `semantic_model` nodes
  • Loading branch information
kentwelcome authored Sep 30, 2024
2 parents 7205aa7 + 4b60437 commit 7c3cbe9
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 7c3cbe9

Please sign in to comment.