I'm using CubeJS pre-aggregation of type original_sql like this in a cube Product:
pre_aggregations: {
base: {
type: `original_sql`,
external: false,
},
main: {
dimensions: [
Product.product_sid,
Product.amount,
],
use_original_sql_pre_aggregations: true,
refresh_key: {
every: `1 day`,
},
},
},
But when I run the query from CubeJS playground, it gives me error relation "dev_pre_aggregations.product_base" does not exist.
I tried checking CubeJS docs and other resources but I'm not able to find any fix.
The datastore used for pre-aggregations is PostgreSQL.
EDIT 1:
When I checked the database, the schema dev_pre_aggregations and table product_base is created but the table name has some random suffix like product_base_ery3312. And I can see those tables are being created on every few minutes even if the refresh key was set to 1 day.