cube.js 学习(九)cube 的pre-aggregation
我们可以使用cube的pre-aggregation 加速数据的查询,以下为一张来自官方的pre-aggregation 架构
参考架构图
pre-aggregation schema
preAggregations: {
amountByCreated: {
type: `rollup`,
measureReferences: [amount],
timeDimensionReference: createdAt,
granularity: `month`
}
}