cube-js / cube-js/cube

Pre-aggregation not working for calculated measure

Open
#7,863 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
In trying to use calculated measures with pre-aggregations, there is a case where when I issue a cube query for a subset of calculated measures (which works when a pre-aggregation is not configured) that fails to work correctly.

**To Reproduce**

Instructions to reproduce the issue are provided in [Reproduction Steps](https://github.com/tomjkidd/cubejs-pre-agg-issue-example/blob/main/doc/ReproductionSteps.md) of [this example repo](https://github.com/tomjkidd/cubejs-pre-agg-issue-example)

**Expected behavior**
When trying to query a pre-aggregation for a subset of calculated measures, I should be able to specify just the ones I want

**Screenshots**
Screenshots are captured in [Reproduction Steps](https://github.com/tomjkidd/cubejs-pre-agg-issue-example/blob/main/doc/ReproductionSteps.md) of the example repo

**Minimally reproducible Cube Schema**
https://github.com/tomjkidd/cubejs-pre-agg-issue-example/blob/main/schema/cubes/cube_repro.js

**Version:**
[0.34.59]

**Additional context**
I created a repo to make it easier to communicate all the context I tried to collect while debugging the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.