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

[SL-1520] [Bug] Duplicate input measure matched in plan rendering #969

Closed
WilliamDee opened this issue Jan 10, 2024 · 0 comments · Fixed by #968
Closed

[SL-1520] [Bug] Duplicate input measure matched in plan rendering #969

WilliamDee opened this issue Jan 10, 2024 · 0 comments · Fixed by #968
Assignees

Comments

@WilliamDee
Copy link
Contributor

Currently, when running through the branch combiner, in an instance where you have 2 derived metrics that contains the same input measure, it would get combined and it doesn't get deduped. Example,

metric:
  name: "derived1"
  description: Test child derived metric 1
  type: derived
  type_params:
    expr: "booking_value + bookings"
    metrics:
      - name: booking_value
      - name: bookings
---
metric:
  name: "derived2"
  description: Test child derived metric 2
  type: derived
  type_params:
    expr: "bookings + instant_bookings"
    metrics:
      - name: instant_bookings
      - name: bookings
---
metric:
  name: "derived_parent"
  description: Test parent derived metric
  type: derived
  type_params:
    expr: "derived1 + derived2"
    metrics:
      - name: derived1
      - name: derived2

This leads to hitting an error during the dataflow rendering where we matched 2 duplicate input measures when expecting only 1 (here). Additionally, the parser in dbt-core utilizes it's own rewritten set of transformation rules and it currently isn't doing any deduping, this is a bug and should be fixed within dbt-core, tho it isn't affecting this issue.

From SyncLinear.com | SL-1520

@WilliamDee WilliamDee self-assigned this Jan 10, 2024
@WilliamDee WilliamDee added Metricflow Created by Linear-GitHub Sync Metricflow Gap Created by Linear-GitHub Sync labels Jan 10, 2024
@WilliamDee WilliamDee removed Metricflow Created by Linear-GitHub Sync Metricflow Gap Created by Linear-GitHub Sync labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant