[SEMANTIC-87] [Feature] Enable Unbounded Rolling Secondary Calculation
See original GitHub issueIs this your first time submitting a feature request?
- I have read the expectations for open source contributors
- I have searched the existing issues, and I could not find an existing issue for this feature
- I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
Describe the feature
For the Rolling Secondary Calculation, I propose interval
can be optionally None which would default the window frame of the function to rows between unbounded preceding and current row
. In this scenario, the aliased metric name would simply be rolling_[metric_name]
.
Describe alternatives you’ve considered
I’m currently overriding the macro(s) to enable unbounded
to be injected rather than interval - 1
to enable this. I considered injecting a larger integer, but Snowflake limits the window frame to 1000 rows when it’s specified. I also considered doing this via the BI layer, but that would require including all metric data in the view (i.e. can’t be filtered) and would be difficult to maintain.
Who will this benefit?
For many metrics, a complete cumulative view over time is incredibly valuable (ex. subscriber count).
Are you interested in contributing this feature?
Yes, I can contribute to complete this
Anything else?
From what I can tell, updates would be needed:
- Readme Documentation
- Actual Rolling Calculation Generation
- Configuration Validation
- Alias Generation
The Configuration Validation could use updating since it’s using the incorrect terminology for the existing error message (it says period_over_period
rather than rolling
).
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7
Hey @callum-mcdata, so sorry I missed these messages; it’s been a hectic few weeks! I haven’t had a second to work on this, so very excited it’s making it in!
No need to apologize, I totally understand! This PR should be merged in by midday and then be part of the 1.3.2 release later today! The TLDR is that
interval
is now an optional input and if no interval is provided then it defaults to an unbounded rolling calc.