-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is this a new bug in dbt-semantic-interfaces?
- I believe this is a new bug in dbt-semantic-interfaces
- I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
An end user has reported a problem with a set.intersection() error in MetricFlow, which was ultimately caused by a mis-configured derived metric defined with no metric inputs. See the community slack thread for more details.
In looking at the derived metric validation logic, there is no check that the metric inputs are non-empty, only a check that all inputs provided exist.
Expected Behavior
If a metric config has derived metrics with no inputs specified, semantic validation should fail with an informative message.
Steps To Reproduce
Create a metric with a spec like this:
metrics:
- name: bad_derived_metric
type: derived
description: "a bad derived metric"
type_params:
expr: "2 + 2"
This will pass validation.
Relevant log output
No response
Environment
- OS:
- Python:
- dbt:
- dbt-semantic-interfaces: 0.4.x through current main
Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working