Skip to content

Commit

Permalink
Remove create_metric as a public facing SemanticModel.Measure pro…
Browse files Browse the repository at this point in the history
…perty

We want to add `create_metric`. The `create_metric` property will be
incredibly useful. However, at this time it is not hooked up, and we don't
have time to hook it up before the code freeze for 1.6.0rc of core. As
it doesn't do anything, we shouldn't allow people to specify it, because
it won't do what one would expect. We plan on making the implementation
of `create_metric` a priority for 1.7 of core
  • Loading branch information
QMalcolm committed Jul 11, 2023
1 parent a57fdf0 commit ec7fb33
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion core/dbt/contracts/graph/unparsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ class UnparsedMeasure(dbtClassMixin):
name: str
agg: str # actually an enum
description: Optional[str] = None
create_metric: bool = False
expr: Optional[Union[str, bool, int]] = None
agg_params: Optional[MeasureAggregationParameters] = None
non_additive_dimension: Optional[UnparsedNonAdditiveDimension] = None
Expand Down
1 change: 0 additions & 1 deletion core/dbt/parser/schema_yaml_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ def _get_measures(self, unparsed_measures: List[UnparsedMeasure]) -> List[Measur
name=unparsed.name,
agg=AggregationType(unparsed.agg),
description=unparsed.description,
create_metric=unparsed.create_metric,
expr=str(unparsed.expr) if unparsed.expr is not None else None,
agg_params=unparsed.agg_params,
non_additive_dimension=self._get_non_additive_dimension(
Expand Down

0 comments on commit ec7fb33

Please sign in to comment.