Skip to content

Commit

Permalink
CT-2732: Fix selector methods to include semantic models (#7936)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb authored Jun 23, 2023
1 parent 779663b commit aecbb45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/dbt/graph/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def _is_graph_member(self, unique_id: UniqueId) -> bool:
elif unique_id in self.manifest.metrics:
metric = self.manifest.metrics[unique_id]
return metric.config.enabled
elif unique_id in self.manifest.semantic_models:
return True
node = self.manifest.nodes[unique_id]

if self.include_empty_nodes:
Expand All @@ -191,6 +193,8 @@ def _is_match(self, unique_id: UniqueId) -> bool:
node = self.manifest.exposures[unique_id]
elif unique_id in self.manifest.metrics:
node = self.manifest.metrics[unique_id]
elif unique_id in self.manifest.semantic_models:
node = self.manifest.semantic_models[unique_id]
else:
raise DbtInternalError(f"Node {unique_id} not found in the manifest!")
return self.node_is_match(node)
Expand Down

0 comments on commit aecbb45

Please sign in to comment.