-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support multiple time spines in one query #1644
Conversation
2020-01-08T00:00:00 2020-01-01T10:00:00 1 3 | ||
2020-01-08T00:00:00 2020-01-01T11:00:00 1 3 | ||
2020-01-08T00:00:00 2020-01-01T12:00:00 1 3 | ||
2020-01-08T00:00:00 2020-01-02T01:00:00 None None |
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.
These nulls are expected due to the the join_to_timespine
metric. They span all the rows that we have in our hourly test time spine.
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.
Note: I'm planning to make some improvements to our time spine test data up the stack. Namely:
- Some of the feedback you gave me previously about
martian_day
- Adding at least one more custom granularity (something fairly standard like
fiscal_quarter
) - Adding more test data to our hourly time spine so that it at least spans more than one custom granularity period
raise RuntimeError( | ||
str( | ||
LazyFormat( | ||
"Unexpected number of time spine sources required for query - cumulative metrics should require exactly one.", |
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.
Custom grains are joined later for cumulative metrics, so this should always be true.
026c56f
to
fde848b
Compare
dbeded9
to
e018ee3
Compare
fde848b
to
06958f2
Compare
06958f2
to
a736cee
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.
👍 Looking forward to the update on the test dataset as you mentioned in 1e56f3b#r1933150079
There are some scenarios where a user might require multiple time spines per query:
1 is already supported. This PR provides support for 2.
Not covered: option 2 with a custom offset window metric. This is coming in the next PR up the stack.