Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct join node specs for GroupByMetrics #1193

Merged
merged 9 commits into from
May 10, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ def get_joinable_metrics_for_semantic_model(
f"last join path element: {using_join_path.last_semantic_model_reference.semantic_model_name}",
)
properties = properties.union(frozenset({LinkableElementProperty.MULTI_HOP}))
# Temp: disable LinkableMetrics with outer join path until there is an interface to specify it.
return LinkableElementSet()

path_key_to_linkable_metrics: Dict[ElementPathKey, Tuple[LinkableMetric, ...]] = {}
for entity_reference in [entity.reference for entity in semantic_model.entities]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import itertools
import typing
from dataclasses import dataclass
from typing import Dict, List, Sequence, Set, Tuple
from typing import Dict, List, Sequence, Tuple

from dbt_semantic_interfaces.dataclass_serialization import SerializableDataclass
from dbt_semantic_interfaces.references import LinkableElementReference, MeasureReference, MetricReference
from dbt_semantic_interfaces.references import MeasureReference, MetricReference
from typing_extensions import override

from metricflow_semantics.collection_helpers.merger import Mergeable
Expand Down Expand Up @@ -84,10 +84,6 @@ def as_tuple(self) -> Tuple[LinkableInstanceSpec, ...]: # noqa: D102
)
)

@property
def as_reference_set(self) -> Set[LinkableElementReference]: # noqa: D102
return {spec.reference for spec in self.as_tuple}

@override
def merge(self, other: LinkableSpecSet) -> LinkableSpecSet:
return LinkableSpecSet(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,55 +120,6 @@
'listing__lux_booking_fraction_of_max_value',
'listing__lux_booking_value_rate_expr',
'listing__lux_listing',
'listing__lux_listing__active_listings',
'listing__lux_listing__approximate_continuous_booking_value_p99',
'listing__lux_listing__approximate_discrete_booking_value_p99',
'listing__lux_listing__average_booking_value',
'listing__lux_listing__average_instant_booking_value',
'listing__lux_listing__bookers',
'listing__lux_listing__booking_fees',
'listing__lux_listing__booking_fees_per_booker',
'listing__lux_listing__booking_payments',
'listing__lux_listing__booking_value',
'listing__lux_listing__booking_value_for_non_null_listing_id',
'listing__lux_listing__booking_value_p99',
'listing__lux_listing__booking_value_per_view',
'listing__lux_listing__booking_value_sub_instant',
'listing__lux_listing__booking_value_sub_instant_add_10',
'listing__lux_listing__bookings',
'listing__lux_listing__bookings_fill_nulls_with_0',
'listing__lux_listing__bookings_fill_nulls_with_0_without_time_spine',
'listing__lux_listing__bookings_join_to_time_spine',
'listing__lux_listing__bookings_per_booker',
'listing__lux_listing__bookings_per_dollar',
'listing__lux_listing__bookings_per_listing',
'listing__lux_listing__bookings_per_lux_listing_derived',
'listing__lux_listing__bookings_per_view',
'listing__lux_listing__derived_bookings_0',
'listing__lux_listing__derived_bookings_1',
'listing__lux_listing__discrete_booking_value_p99',
'listing__lux_listing__double_counted_delayed_bookings',
'listing__lux_listing__instant_booking_fraction_of_max_value',
'listing__lux_listing__instant_booking_value',
'listing__lux_listing__instant_booking_value_ratio',
'listing__lux_listing__instant_bookings',
'listing__lux_listing__instant_lux_booking_value_rate',
'listing__lux_listing__instant_plus_non_referred_bookings_pct',
'listing__lux_listing__largest_listing',
'listing__lux_listing__listings',
'listing__lux_listing__lux_booking_fraction_of_max_value',
'listing__lux_listing__lux_booking_value_rate_expr',
'listing__lux_listing__lux_listings',
'listing__lux_listing__max_booking_value',
'listing__lux_listing__median_booking_value',
'listing__lux_listing__min_booking_value',
'listing__lux_listing__nested_fill_nulls_without_time_spine',
'listing__lux_listing__non_referred_bookings_pct',
'listing__lux_listing__referred_bookings',
'listing__lux_listing__smallest_listing',
'listing__lux_listing__twice_bookings_fill_nulls_with_0_without_time_spine',
'listing__lux_listing__views',
'listing__lux_listing__views_times_booking_value',
'listing__lux_listings',
'listing__max_booking_value',
'listing__median_booking_value',
Expand Down Expand Up @@ -208,65 +159,6 @@
'user__account__user__total_account_balance_first_day',
'user__active_listings',
'user__company',
'user__company__active_listings',
'user__company__current_account_balance_by_user',
'user__company__identity_verifications',
'user__company__largest_listing',
'user__company__listing__user__company__approximate_continuous_booking_value_p99',
'user__company__listing__user__company__approximate_discrete_booking_value_p99',
'user__company__listing__user__company__average_booking_value',
'user__company__listing__user__company__average_instant_booking_value',
'user__company__listing__user__company__bookers',
'user__company__listing__user__company__booking_fees',
'user__company__listing__user__company__booking_fees_per_booker',
'user__company__listing__user__company__booking_payments',
'user__company__listing__user__company__booking_value',
'user__company__listing__user__company__booking_value_for_non_null_listing_id',
'user__company__listing__user__company__booking_value_p99',
'user__company__listing__user__company__booking_value_per_view',
'user__company__listing__user__company__booking_value_sub_instant',
'user__company__listing__user__company__booking_value_sub_instant_add_10',
'user__company__listing__user__company__bookings',
'user__company__listing__user__company__bookings_fill_nulls_with_0',
'user__company__listing__user__company__bookings_fill_nulls_with_0_without_time_spine',
'user__company__listing__user__company__bookings_join_to_time_spine',
'user__company__listing__user__company__bookings_per_booker',
'user__company__listing__user__company__bookings_per_dollar',
'user__company__listing__user__company__bookings_per_view',
'user__company__listing__user__company__derived_bookings_0',
'user__company__listing__user__company__derived_bookings_1',
'user__company__listing__user__company__discrete_booking_value_p99',
'user__company__listing__user__company__double_counted_delayed_bookings',
'user__company__listing__user__company__instant_booking_fraction_of_max_value',
'user__company__listing__user__company__instant_booking_value',
'user__company__listing__user__company__instant_booking_value_ratio',
'user__company__listing__user__company__instant_bookings',
'user__company__listing__user__company__instant_lux_booking_value_rate',
'user__company__listing__user__company__instant_plus_non_referred_bookings_pct',
'user__company__listing__user__company__lux_booking_fraction_of_max_value',
'user__company__listing__user__company__lux_booking_value_rate_expr',
'user__company__listing__user__company__max_booking_value',
'user__company__listing__user__company__median_booking_value',
'user__company__listing__user__company__min_booking_value',
'user__company__listing__user__company__nested_fill_nulls_without_time_spine',
'user__company__listing__user__company__non_referred_bookings_pct',
'user__company__listing__user__company__referred_bookings',
'user__company__listing__user__company__twice_bookings_fill_nulls_with_0_without_time_spine',
'user__company__listing__user__company__views',
'user__company__listing__user__company__views_times_booking_value',
'user__company__listings',
'user__company__lux_listings',
'user__company__regional_starting_balance_ratios',
'user__company__revenue',
'user__company__revenue_all_time',
'user__company__smallest_listing',
'user__company__total_account_balance_first_day',
'user__company__views',
'user__company__visit_buy_conversion_rate',
'user__company__visit_buy_conversion_rate_7days',
'user__company__visit_buy_conversion_rate_7days_fill_nulls_with_0',
'user__company__visit_buy_conversion_rate_by_session',
'user__company__visit_buy_conversions',
'user__company_name',
'user__created_at__day',
'user__created_at__extract_day',
Expand Down
Loading
Loading