Describe the bug
I'd like to override the default value of preAggregationsSchema (stb_pre_aggregations). When I define preAggregationsSchema in the query, I get the error Invalid query format: "preAggregationsSchema" is not allowed.
To Reproduce
Run the following query:
{
"measures": ["Test.count"],
"dimensions": ["Test.value"],
"filters": [],
"timeDimensions": [],
"timezone": "CET",
"preAggregationsSchema": "my_pre_aggregations"
}
Expected behavior
Cube.js uses the passed preAggregationsSchema from the query.
Version:
0.4.5
Additional context
preAggregationsSchema is not part of querySchema (https://github.com/statsbotco/cube.js/blob/master/packages/cubejs-api-gateway/index.js#L104)
@dtslvr Hey Thomas! It's actually intended. preAggregationsSchema is part of internal configuration that should be set up on server-wide level. I guess we can add it as CubejsServerCore option. Does it work for you?
Hi @paveltiunov, yes an option for preAggregationsSchema in CubejsServerCore makes totally sense.
I haven't received a notification that it's already done 馃 Thanks @paveltiunov, will check it next week.
Works fine! I have created a pull request (https://github.com/cube-js/cube.js/pull/195) to update the typings.