-
Couldn't load subscription status.
- Fork 1.9k
Closed
Labels
backend:serverIssues relating to Cube Core's ServerIssues relating to Cube Core's ServerbugLEGACY. Use the Bug issue type insteadLEGACY. Use the Bug issue type insteaddriver:athenaIssues related to the AWS Athena driverIssues related to the AWS Athena driverdriver:duckdbdriver:mssqlIssues relating to the MSSQL driverIssues relating to the MSSQL driver
Description
Describe the bug
As reported in Slack, Cube v0.35.81 and above, including Cube v0.36.3, at least for Athena (confirmed), possibly for MS SQL and DuckDB (reported), renders date interval boundaries as NULL in the following case of FILTER_PARAMS usage.
Data model:
cube(`f_clickstream_events`, {
sql: `SELECT '2024-01-01::TIMESTAMP AS event_ts, 123 AS value'`,
dimensions: {
event_ts: {
sql: `event_ts`,
type: `time`
},
value: {
sql: `value`,
type: `number`
}
},
preAggregations: {
widget: {
dimensions: [
value
],
time_dimension: CUBE.event_ts,
granularity: `day`,
partition_granularity: `month`,
build_range_start: {
sql: `SELECT current_date - interval '180' day`,
},
build_range_end: {
sql: `SELECT current_date + interval '1' day`,
},
scheduledRefresh: true,
refresh_key: {
every: '4 hours',
sql: `
SELECT max(etl_ts) as etl_ts
FROM dv_marts.f_clickstream_events
WHERE ${FILTER_PARAMS.f_clickstream_events.event_ts.filter('date(event_ts)')}`,
},
},
},
})Data source: Athena.
Refresh key query to the data source—see NULLs:

To Reproduce
Steps to reproduce the behavior:
- Use the data model above
- Connect to Athena
- Try to build a pre-aggregation
- See Cube running the refresh key query shown above
Expected behavior
Apparently, Cube rendered boundaries correctly (without NULLs) before v0.35.81.
Version:
v0.35.81+, v0.36.3
sanromeo, demirhanaydin and itestyoy
Metadata
Metadata
Assignees
Labels
backend:serverIssues relating to Cube Core's ServerIssues relating to Cube Core's ServerbugLEGACY. Use the Bug issue type insteadLEGACY. Use the Bug issue type insteaddriver:athenaIssues related to the AWS Athena driverIssues related to the AWS Athena driverdriver:duckdbdriver:mssqlIssues relating to the MSSQL driverIssues relating to the MSSQL driver