You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Feature Request: Add an option for pre-aggregation, similar to window functions. For example, over the last 90 days, and calculate pre-aggregation only for this period. For calculations outside of this period, use a non-pre-aggregated query. This is useful when one part of the query involves slowly changing dimensions and when users typically analyze data for a specific period
The text was updated successfully, but these errors were encountered:
itestyoy
changed the title
Pre-aggregation within window
[Feature request] Pre-aggregation within window
May 3, 2024
igorlukanin
added
question
The issue is a question. Please use Stack Overflow for questions.
enhancement
New feature proposal
and removed
question
The issue is a question. Please use Stack Overflow for questions.
labels
May 13, 2024
Currently, you can use build_range_start and build_range_end options to specify the date range for a pre-aggregation to target. However, Cube will not return results outside of the defined build range, even when lambda pre-aggregations are used.
I was actually hoping that lambda pre-aggregations would allow to query data "earlier than in the rollup" but apparently they only allow to query "later than in the rollup":
cubes:
- name: build_rangesql: > SELECT 1 AS value, '2024-01-01'::TIMESTAMP AS time UNION ALL SELECT 2 AS value, '2024-02-10'::TIMESTAMP AS time UNION ALL SELECT 3 AS value, '2024-03-20'::TIMESTAMP AS timedimensions:
- name: timesql: timetype: timemeasures:
- name: value_sumsql: valuetype: sumpre_aggregations:
- name: lambdatype: rollup_lambdabuild_range_start:
sql: SELECT '2024-01-01'::TIMESTAMPunion_with_source_data: truerollups:
- main
- name: mainmeasures:
- value_sumtime_dimension: timegranularity: daypartition_granularity: daybuild_range_start:
sql: SELECT '2024-02-01'::TIMESTAMPrefresh_key:
every: 1 hour
Hi!
Feature Request: Add an option for pre-aggregation, similar to window functions. For example, over the last 90 days, and calculate pre-aggregation only for this period. For calculations outside of this period, use a non-pre-aggregated query. This is useful when one part of the query involves slowly changing dimensions and when users typically analyze data for a specific period
The text was updated successfully, but these errors were encountered: