-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support window functions in Cube Store #8932
Comments
Thanks for a very elaborate question @ChloeBellm 🙌 A couple of points here:
I hope this helps. |
Thanks @igorlukanin! Good to hear this is on the roadmap. How would running a query with fewer dimensions work if we want to apply measure filters at the dimension breakdown the user has selected? For example, if we have some data: Where A is a dimension, and B is a "sum" measure. First query asks for dimension A and measure B with a filter on B > 25 and this returns just orange. The total we'd like to show is therefore 30. Please let me know if I should open a new issue for this question. |
@ChloeBellm Oh, I see now. You have a measure filter, and this basically renders my "less dimensions" workaround useless. How do you plat to consume the data? It looks like you might need to calculate totals on the client side then—until we get either multi-stage cals or window functions support in Cube Store. |
@igorlukanin we want to show users a table of data and a totals row. |
Describe the bug
I think this is a bug based on the error message but if this isn't supported would love to hear workaround suggestions as this is currently preventing us from using pre aggregations.
I'm expecting to create a pre aggregation with column A. I then want to query column B, which is a measure based on a window function on A but get the following error:
The use case for this is to get a "totals" row, so my window function is just
sum(sum(A)) over ()
To Reproduce
Steps to reproduce the behavior:
This is correct but throws the error above.
Expected behavior
I expected it to run the SQL query above and give me a total column as column B.
Example expected output:
A | B
1 | 12
3 | 12
8 | 12
Where B is the total of everything in column A. We should assume filters have been applied, which is why this needs to be calculated after pre aggregations created.
Screenshots
Error on playground:
Minimally reproducible Cube Schema
Version:
0.36.7
Additional context
If there are any other suggestions as to how to do totals (and sub totals) we would love to hear these too!
The text was updated successfully, but these errors were encountered: