Skip to content

Alternate week granularity to allow for week starting either Sunday OR Monday and other granularities #177

@iktl

Description

@iktl

Is your feature request related to a problem? Please describe.
We work with a dataset where some customers consider a week differently, where a "week" is starting either Sunday or Monday. Cube hits most of our use cases, but the week granularity option conforms to the standard week observed by Postgres (our current adaptor). So, for some customers, we cannot use a week granularity and this breaks some reporting needs we have.

Describe the solution you'd like
I'd like to be able to utilize a secondary week granularity option to opt out of the default behaviour, and roll up data to a week starting Sunday instead of a week starting Monday. I recognize that Postgres conforms to the ISO standard of a week starting on a Monday, and would want to maintain that as a the default behavior, hence adding week_sunday as an alternate option.

Describe alternatives you've considered
I've been able to patch in support for a week starting Sunday by hotfixing the Postgres adaptor and where Cube validates the incoming query, but I suspect (though have not tested) this will break any option to pre-aggregate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:serverIssues relating to Cube Core's ServerenhancementLEGACY. Use the Feature issue type insteadhelp wantedCommunity contributions are welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions