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

Add pagination and sorting mechanism #185

Merged
merged 21 commits into from
Jul 11, 2024
Merged

Add pagination and sorting mechanism #185

merged 21 commits into from
Jul 11, 2024

Conversation

sosna
Copy link
Member

@sosna sosna commented Dec 15, 2023

Fix #50
Fix #151

agent96
agent96 previously approved these changes Dec 15, 2023
Sort:  
- by default, always group observations into time series and sort by ascending time period
- within components sort by code ID or non-coded value

Pagination:
- added series key for serieskeyonly queries
- shorten sentence (and correct missing word)
Sort:  
- by default, always group observations into time series and sort by ascending time period
- within components sort by code ID or non-coded value

Pagination:  
- added series key for serieskeyonly queries
Pagination:
- added series key for serieskeyonly queries

Corrections for `e.g.` syntax.
@dosse
Copy link
Contributor

dosse commented Dec 16, 2023

@sosna I made the following changes:

Rest-cheat-sheet:

  • syntax corrections for e.g.

Pagination:

  • added series key for serieskeyonly queries

Sort:

  • by default, always group observations into time series and sort by ascending time period
  • within components sort by code ID or non-coded value

Something that still needs clarification is the following:

If the data are sorted by the components in the order stated in the sort clause, then sort=TIME_PERIOD:desc would do the following: It would first sort in descending order of TIME_PERIOD and then by the other components in a nondeterministic way, e.g.,

  FREQ,DIM1,TIME_PERIOD,OBS_VALUE
  A,A,2022,1.0654
  A,B,2022,1.0261
  A,A,2021,1.0752
  A,B,2021,1.0730

In consequence, the observations will not be grouped by time series. I don't think that this was intended with sort=TIME_PERIOD:desc, right?

This could be solved by saying:
The data are sorted first in a nondeterministic way for any component not included in the sort parameter and then in the order of components in the sort parameter. In this way, sort=TIME_PERIOD:asc would also be the default sorting value if the data has a time dimension.

Ok for you?

stratosn
stratosn previously approved these changes Jan 11, 2024
@dosse
Copy link
Contributor

dosse commented May 27, 2024

@sosna @stratosn @agent96 I have updated the pull request with the changes discussed and agreed this Feb per email, notably adding the feature to use * in the sort as replacement for all components (incl. TIME_PERIOD). For me, the specs are fully ready. We can have this reviewed and approved by TWG in June meeting next week if ok for you.

doc/data.md Outdated Show resolved Hide resolved
api/sdmx-rest.yaml Outdated Show resolved Hide resolved
api/sdmx-rest.yaml Outdated Show resolved Hide resolved
api/sdmx-rest.yaml Outdated Show resolved Hide resolved
dosse added 3 commits June 2, 2024 15:06
resolve conflict
resolve conflicts
Remove incorrect commas
Clarified meaning of `serieskey` sort option.
@sosna
Copy link
Member Author

sosna commented Jun 3, 2024

Thanks, @dosse. The PR looks good to me!

@sosna sosna requested review from agent96 and stratosn July 5, 2024 07:36
api/sdmx-rest.yaml Outdated Show resolved Hide resolved
api/sdmx-rest.yaml Outdated Show resolved Hide resolved
@sosna sosna requested a review from stratosn July 11, 2024 14:50
@sosna sosna merged commit 48ec841 into develop Jul 11, 2024
@sosna sosna deleted the cr-50_151 branch July 11, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow ordering the data query results by dimensions Allow slicing of data messages
4 participants