cube-js/cube

Configurable global default for refreshKey

Open

#4 649 ouverte le 1 juin 2022

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)Rust (1 965 forks)batch import
backend:serverhelp wantedloggedreviewed

Métriques du dépôt

Stars
 (19 563 stars)
Métriques de merge PR
 (Merge moyen 5j 16h) (138 PRs mergées en 30 j)

Description

Unless I specify refreshKey for a particular code, it defaults to 2 minutes for BQ and to 10 seconds for other databases. That is really wasteful in our case. We update analytics once a day, to hitting database after 10 seconds is not necessary, a refreshKey of 'every 1 hour' will be more useful. I can change it for each cube, but this is tedious and error-prone work.

I would like a way to specify default refreshKey in configuration. Either as constant, or maybe as function taking database kind/name/appId/whatever.

I considered manually editing all cubes, but this is fragile - I can miss a cube, or a colleague can add a cube in future without setting refreshKey

Guide contributeur