rollingWindow measure pre aggregations don't work for MS SQL data sources
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Describe the bug**
Pre aggregations don't work for rollingWindow measures when the data source is MS SQL. The refresh scheduler reports an error: `Error: Time series queries without dateRange aren't supported` which comes from the MS SQL schema compiler adapter.
I have tried defining `partition_granularity` with `build_range_start` and `build_range_end` to put some bounds on the ranges pre aggregated, but that doesn't help the issue.
**To Reproduce**
Set up a pre aggregation for a measure that uses `rollingWindow`.
**Expected behavior**
It should pre aggregate the data correctly.
**Actual behavior**
The refresh scheduler reports an error: `Error: Time series queries without dateRange aren't supported`
**Minimally reproducible Cube Schema**
```javascript
cube(`session`, {
sql_table: `test_db`,
data_source: `default`,
measures: {
weeklyCount: {
sql: `id`,
type: `count`,
rollingWindow: {
leading: `1 week`,
offset: `start`,
},
},
},
dimensions: {
created_at: {
sql: `${CUBE}."created_at"`,
type: `time`
}
},
preAggregations: {
main: {
measures: [session.weeklyCount],
timeDimension: session.created_at,
granularity: `day`
}
}
});
```
**Version:**
0.33.33
Contributor guide
Assessment
This issue has not been assessed yet.