Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Relative Date Conversios/Inheritance for Query Builder #45

Open
norbertbede opened this issue Feb 22, 2020 · 4 comments
Open

Relative Date Conversios/Inheritance for Query Builder #45

norbertbede opened this issue Feb 22, 2020 · 4 comments

Comments

@norbertbede
Copy link

Use Case. Let say I have field dateordered. I select “orderfacts” table - open in query builder, group by dateordered then select Month of year. Error “month-of-year granularity not supported by Cube.js”.

Test Result: Fall - any of relative driver doesn't works, not implemented yet.

quarter-groupby-date

  • not the best screenshot because here quarter make error, however same just when select e.g Month of Year, then i'm getting "month-of-year granularity not supported by Cube.js"

**I have asked @paveltiunov slack chat **

As a rule of a thumb formatting is usually client side problem. probably related topic: cube-js/cube#177

As get help I made a forum thread in Metabase forum
https://discourse.metabase.com/t/month-of-year-api-for-driver-implementation/9102

The Question: ATM we can’t find way how to convert datefield to relative date formats in metabase driver. (postgres can do this by “commands” Mon, NM, dy, DD, WW…etc. ). We are looking for example code, how to improve the cubejs driver or API doc for handling relative date in driver. (convert/inherit relative dates from a simpe datetime field.) - avoid generate unnecessary fake dimensions.

@norbertbede norbertbede changed the title Relative Date Conversion Implementation for Query Builder Relative Date Conversios/Inheritance for Query Builder Feb 22, 2020
@norbertbede
Copy link
Author

@pyrooka
Copy link
Owner

pyrooka commented Mar 30, 2020

This is fixed in your PR #47 , right?

@igorpojzl
Copy link
Contributor

I think this issue is about special granularities eg. (Month of Year, Week of Year) and not Relative DateTime in filter.

@pyrooka
Copy link
Owner

pyrooka commented Mar 31, 2020

You are right, my bad.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants