刷新后将复制CubeJS预聚合表

我正在尝试使用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中是否有一种方法可以更改刷新期间如何管理预聚合表的行为?

iCMS 回答:刷新后将复制CubeJS预聚合表

这是预期的行为。请参阅https://cube.dev/docs/pre-aggregations#pre-aggregations-garbage-collection,以在此处详细了解基本原理。

本文链接:https://www.f2er.com/1853509.html

大家都在问