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

Remove duplicate timeDimension field from result data #676

Open
paulmsinclair opened this issue May 28, 2020 · 1 comment
Open

Remove duplicate timeDimension field from result data #676

paulmsinclair opened this issue May 28, 2020 · 1 comment
Labels
backend:server Issues relating to Cube Core's Server enhancement New feature proposal

Comments

@paulmsinclair
Copy link

paulmsinclair commented May 28, 2020

Currently when I specify a Time Dimension in a query, the data in the result will include both this plus a duplicate value in another field which is named with a .granularity suffix.

For example if I specify a query like this:

{"timeDimensions": [{"dimension": "Cube.timeDimension", "granularity": "month"}], "measures": ["Cube.measure"]}]}

I am getting a result like this:

{"Cube.timeDimension.month":"2016-08-01T00:00:00.000","Cube.timeDimension":"2016-08-01T00:00:00.000","Cube.measure":1}

One of these 2 fields which both represent the same value, should be removed or there should be a way to tell the backend that we do not want the extra field returned in the result.
This is what I would like returned:

{"Cube.timeDimension":"2016-08-01T00:00:00.000","Cube.measure":1}

As a workaround I can remove the granularity from the timeDimension and specify the field as a regular dimension which enables the required grouping, and removes the unwanted extra field from the result data.

@paveltiunov
Copy link
Member

@paulmsinclair Hey Paul! Thanks for posting this one! It was added for backward compatibility and we'll remove it in future versions. However Cube.timeDimension will be removed not Cube.timeDimension.month

@paveltiunov paveltiunov added the enhancement New feature proposal label May 30, 2020
@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 enhancement New feature proposal
Projects
None yet
Development

No branches or pull requests

3 participants