Skip to content

Commit

Permalink
Use DSI GroupByMetricReference (#1340)
Browse files Browse the repository at this point in the history
Tiny cleanup. Moved this class to DSI recently, but hadn't gotten around
to removing the MF implementation.
  • Loading branch information
courtneyholcomb authored Jul 16, 2024
1 parent ab20927 commit abadb80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dbt_semantic_interfaces.references import (
DimensionReference,
EntityReference,
LinkableElementReference,
GroupByMetricReference,
MetricReference,
SemanticModelReference,
)
Expand Down Expand Up @@ -217,17 +217,6 @@ def semantic_model_origin(self) -> SemanticModelReference:
return self.defined_in_semantic_model


# TODO: add to DSI
@dataclass(frozen=True)
class GroupByMetricReference(LinkableElementReference):
"""Represents a group by metric.
Different from MetricReference because it inherits linkable element attributes.
"""

pass


@dataclass(frozen=True)
class LinkableMetric(LinkableElement, SerializableDataclass):
"""Describes how a metric can be realized by joining based on entity links."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
from typing import Any, Tuple

from dbt_semantic_interfaces.dataclass_serialization import SerializableDataclass
from dbt_semantic_interfaces.references import EntityReference
from dbt_semantic_interfaces.references import EntityReference, GroupByMetricReference
from typing_extensions import override

from metricflow_semantics.model.semantics.linkable_element import (
ElementPathKey,
GroupByMetricReference,
LinkableElementType,
)
from metricflow_semantics.model.semantics.linkable_element import ElementPathKey, LinkableElementType
from metricflow_semantics.naming.linkable_spec_name import StructuredLinkableSpecName
from metricflow_semantics.specs.entity_spec import EntitySpec
from metricflow_semantics.specs.instance_spec import InstanceSpecVisitor, LinkableInstanceSpec
Expand Down

0 comments on commit abadb80

Please sign in to comment.