Skip to content

[Feature request] Use dimensions from pre-aggregations to calculate measures #8763

@itestyoy

Description

@itestyoy

Hi there!

We’re trying to build a cube like the one below, and we expected it to use pre-aggregations to calculate the metric because the pre_aggregations include the day dimension. However, the generated query doesn’t seem to involve the pre-aggregations.

Feature Request: Use dimensions from pre-aggregations to calculate measures.

cube('model', {
  public: false,
  title: 'model',

  sql: `SELECT 1 as metric, 1 as day`,

  dimensions: {
    day: {
      sql: `day`,
      type: 'number'
    }
  },

  measures: {
    metric: {
      sql: `${day}`,
      type: `count_distinct`
    }
  },

  pre_aggregations: {
    model_rollup: {
      measures: [],
      dimensions: [
        CUBE.day
      ],
      external: false,
    }
  }
});

Metadata

Metadata

Assignees

Labels

cube storeIssues relating to Cube Store

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions