Skip to content
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 for "last" measure with preaggs #593

Open
keeganmccallum opened this issue Apr 14, 2020 · 2 comments
Open

Support for "last" measure with preaggs #593

keeganmccallum opened this issue Apr 14, 2020 · 2 comments
Labels
backend:server Issues relating to Cube Core's Server data modeling enhancement New feature proposal

Comments

@keeganmccallum
Copy link

keeganmccallum commented Apr 14, 2020

Is your feature request related to a problem? Please describe.
I have a schema where I want to select the last value, base on the timestamp, for a given dimension. I currently use (with presto as db):

        last: {
            sql: `max_by(value, ${CUBE}.timestamp)`,
            type: `number`
        },

which works well except that it doesn't match to any preaggs.

Describe the solution you'd like
I was wondering if it would be possible to include first and last as builtin measure types to allow them to work with preaggs

Describe alternatives you've considered
Not sure if there are any other ways to get this to work with rollups, can't find any docs on rollups + number measure type

Additional context
trying to build a realtime view

@paveltiunov
Copy link
Member

@keeganmccallum Hey Keegan! Thanks for posting this! Which DB do you use?

@paveltiunov paveltiunov added the enhancement New feature proposal label Apr 14, 2020
@keeganmccallum
Copy link
Author

Thanks for the quick follow up! We're using presto for this

@hassankhan hassankhan added the backend:server Issues relating to Cube Core's Server label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:server Issues relating to Cube Core's Server data modeling enhancement New feature proposal
Projects
None yet
Development

No branches or pull requests

4 participants