Metric-based Filter in Lineage from SL #12412
Open
+173
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added node handling logic, test, and feature.
Resolves #12411
Problem
Semantic lineage previously ignored metrics that only appeared inside MetricFlow
wherefilters (includingMetric()expressions on measures, ratio components, or saved query clauses). Those filter-only references never surfaced asdepends_onedges, so downstream manifests, docs, and governance tooling could not see that one metric relied on another through a filter.Solution
WhereFilterIntersectionon metrics (top-level filters, measure filters, ratio/conversion/cumulative params, and nestedinput_metrics). Convert discovered metric calls into syntheticMetricInputs so they plug into the existing lineage builder.query_params.wherefor metric calls and add those targets todepends_onwhen they are only mentioned in filters.Checklist