-
Notifications
You must be signed in to change notification settings - Fork 99
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
Allow querying SCDs without metric_time
#1621
Conversation
73787e5
to
952cb2c
Compare
15ea5af
to
8b2fe9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
@pytest.mark.sql_engine_snapshot | ||
@pytest.mark.duckdb_only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice! When did we add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fairly recently: #1565
|
||
@pytest.mark.sql_engine_snapshot | ||
@pytest.mark.duckdb_only | ||
def test_scd_with_coarser_grain( # noqa: D103 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth grouping by the listing as well so we can see when the same one is listed multiple times, and then have the docstring explain what's expected. Up to you if you want to do this.
2020-01-01T00:00:00 3 2 | ||
2020-01-01T00:00:00 4 5 | ||
2020-01-01T00:00:00 5 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. This one is also interesting because the input data is actually truncated by the filter. This is the behavior we're implementing here but I suspect it's worth documenting these cases in some detail when we update the docs page.
@@ -192,19 +189,4 @@ def validate_measure_in_resolution_dag( | |||
measure_reference: MeasureReference, | |||
resolution_path: MetricFlowQueryResolutionPath, | |||
) -> MetricFlowQueryResolutionIssueSet: | |||
scd_linkable_elemenent_set_for_measure = self._scd_linkable_element_set_for_measure(measure_reference) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like we can now remove _scd_linkable_element_set_for_measure
and the mention of SCD in the class docstring?
Remove query validation that requires including
metric_time
in the group by if your query includes an SCD. After much product discussion, we've decided this aligns the behavior users expect for SCDs.