jazzido / mondrian-rest

A REST interface for Mondrian ROLAP server
MIT License
32 stars 8 forks source link

[Feature] Limiting results #30

Closed jspeis closed 6 years ago

jspeis commented 6 years ago

For Data USA: The ability to limit the number of results returned by the API (e.g. in conjunction with #29 could be used to return top 5 results on some metric)

jazzido commented 6 years ago

To clarify: it only makes sense to implement this in the 'tidy' formats that mondrian-rest can generate, i.e.: XLS, CSV and JSONRecords. The default JSON response format is multidimensional, so there's no way (AFAICT) to limit/offset the result set.

jspeis commented 6 years ago

Seems like it's possible using the Generate function? https://docs.microsoft.com/en-us/sql/mdx/generate-mdx