-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ActiveUsers not working if grouping is larger than hour #216
Comments
@janrenz Hey Jan! Thanks for posting this! Very interesting. Seems like timezone issue. Could you please share what is returned back in |
Sure :) So, its seems to be only a UI problem in the playground ...
|
Yeah. I see. It's timezone issue. |
So something i can fix in my data or in my schema? Or something in cube.js..? |
@janrenz In Cube.js. I think there's a problem with this line: https://github.com/cube-js/cube.js/blob/e26ad42bb0c876c5c7c9490c91efbcf9089a7441/packages/cubejs-api-gateway/index.js#L66 |
I can confirm this. The input value if grouping is set to day or larger is an instance of Date, but |
@janrenz What's the type of |
its a Date. if i change the code to: |
As the docs state: Cube.js always expects timestamp with timezone |
@janrenz Actually it's a bug. Generated SQL for time series contains incorrect date type. Just fixed. |
Great. Thx! |
Describe the bug
I have setup a very basic MVP to determine ActiveUsers based on the docs. It only works if grouping is set to hour.
To Reproduce
Project setup: PostgreSQL 11.5
Event Schema:
Adding some events to the database. Select metric and choose date range and group level hour. Works fine. Select day as grouping -> no results
Expected behavior
Works with all available time grouping options.
Screenshots
The text was updated successfully, but these errors were encountered: