Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
itestyoy opened this issue Oct 1, 2024 · 0 comments

Comments

@itestyoy
Copy link

itestyoy commented Oct 1, 2024

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,
    }
  }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant