我正在尝试使用CubeJS通过预聚合缓存来加快查询速度。我定义了以下多维数据集:
cube({
// assume all measures and dimensions are defined as necessary
...
preAggregations: {
report: {
type: `rollup`,measureReferences: [totalValue],dimensionReferences: [
name,portfolio,country
],refreshKey: {
every: `1 day`
},external: true
}
}
原始daya存储在Redshift中,预聚合存储在RDS Aurora Postgresql中。问题在于,刷新预聚合后,report
预聚合表将被复制,而不是替换RDS中先前的旧缓存表。我想避免建立过时的数据,也希望避免手动维护数据库。 CubeJS中是否有一种方法可以更改刷新期间如何管理预聚合表的行为?