Cube.js: Make preAggregationsSchema an option of CubejsServerCore

Created on 29 Apr 2019  路  4Comments  路  Source: cube-js/cube.js

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)

enhancement help wanted

All 4 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings