Skip to content

Commit

Permalink
Add helper properties to SemanticModelJoinPath
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Apr 11, 2024
1 parent 0aa03f3 commit 6e19289
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions metricflow/model/semantics/linkable_spec_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ def last_semantic_model_reference(self) -> SemanticModelReference:
"""The last semantic model that would be joined in this path."""
return self.last_path_element.semantic_model_reference

@property
def last_entity_link(self) -> EntityReference: # noqa: D102
return self.last_path_element.join_on_entity

@property
def entity_links(self) -> Tuple[EntityReference, ...]: # noqa: D102
return tuple(path_element.join_on_entity for path_element in self.path_elements)


class ValidLinkableSpecResolver:
"""Figures out what linkable specs are valid for a given metric.
Expand Down

0 comments on commit 6e19289

Please sign in to comment.