cube-js / cube-js/cube

Add `CUBEJS_PRE_AGG_DB_QUERY_TIMEOUT` env var to set different timeout setting for pre aggregations.

Open
#6,670 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

**Is your feature request related to a problem? Please describe.**

We use Cube.dev to allow our users to run ad-hoc queries using the SQL and GraphQL API which we have no control over. At the same time we have dashboards which we have more control over it.

For the dashboards we have complex queries over large amount of data and pre aggregations can take 10-20min to complete. At the same time, we want to timeout and cancel long running ad-hoc queries so we want to set the DB query timeout to a low value but this is causing the pre aggregations to fail because of the time out.

**Describe the solution you'd like**

We would like to have two env vars:

`CUBEJS_DB_QUERY_TIMEOUT`: Already exists, this is for regular queries.
`CUBEJS_PRE_AGG_DB_QUERY_TIMEOUT`: Applies only for pre aggregation queries.

**Describe alternatives you've considered**

Control the timeout in the frontend.

**Additional context**

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.