cube.js 学习(九)cube 的pre-aggregation

我们可以使用cube的pre-aggregation 加速数据的查询,以下为一张来自官方的pre-aggregation 架构

参考架构图

pre-aggregation schema

preAggregations: {
  amountByCreated: {
    type: `rollup`,
    measureReferences: [amount],
    timeDimensionReference: createdAt,
    granularity: `month`
  }
}

参考资料

https://cube.dev/docs/caching
https://cube.dev/docs/pre-aggregations

posted on 2019-05-03 13:15  荣锋亮  阅读(445)  评论(0编辑  收藏  举报

导航