cube icon indicating copy to clipboard operation
cube copied to clipboard

Pre-aggregations for a rolling-window measure

Open atotev opened this issue 5 years ago • 7 comments
trafficstars

Description

I have a cube with an unbounded rolling-window measure. I would like to have pre-aggregation support for this type of measures.

Pre-agg
preAggregations: {
    myRollup: {
      type: `rollup`,
      measureReferences: [myMeasure],
      timeDimensionReference: eventDate,
      granularity: `day`
    },
Measure
measures: {
    myMeasure: {
      type: `avg`,
      sql: `${value}`,
      rollingWindow: {
        trailing: `unbounded`
      }
    },
Query

Note: This query should trigger the pre-aggregation, but does not.

{
   "measures":[
      "MyCube.myMeasure"
   ],
   "timeDimensions":[
      {
         "dimension":"MyCube.eventDate",
         "granularity":"day",
         "dateRange":"Last%20month"
      }
   ]
}

atotev avatar Jan 01 '20 17:01 atotev

@atotev Thanks for posting this!

paveltiunov avatar Jan 01 '20 18:01 paveltiunov

@paveltiunov I ran into this issue recently and it became a roadblock for how my team was planning to use Cube.js with a particular cube definition containing rollingWindow. My team and I are interested in helping, but could use some guidance on what would be involved / where to look for doing so.. thanks!

yatesdev avatar Dec 15 '20 18:12 yatesdev

Do we have any solution to this problem?? I am facing the same problem.

manikasharma70 avatar Mar 16 '21 05:03 manikasharma70

Hi all,

Just as an update, this issue is on our roadmap and we hope to have something ready this quarter.

hassankhan avatar May 18 '21 13:05 hassankhan

What's the current ETA on resolution for this?

levenal avatar Jul 16 '21 20:07 levenal

I can't create pre-aggregation tables for rollingwindow measure types using cube 0.28.64 Any updates regarding this?

anilb0stanci avatar Dec 10 '21 13:12 anilb0stanci

Hey @hassankhan, was this still on the roadmap? Cheers!

wub avatar Sep 17 '22 05:09 wub

Implemented in latest versions.

paveltiunov avatar Jun 21 '23 22:06 paveltiunov