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,
}
}
});