Enable full datastore_search api for datastore/dump endpoint
- Dominant language
- No language data
- Stars
- 39
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
It's pretty handy to filter tabular data and download it as a CSV so that [casual users can open it as a spreadsheet](http://sunlightfoundation.com/blog/2014/03/11/making-json-as-simple-as-a-spreadsheet/). It looks like the [dump endpoint](https://github.com/ckan/ckan/blob/master/ckanext/datastore/controller.py#L22) might be able to support this functionality by passing along a few more query params to datastore_search.
Holler if this would be useful and I can submit a PR. Cheers.
```
data_dict = {
'resource_id': resource_id,
'limit': request.GET.get('limit', 100000),
'offset': request.GET.get('offset', 0),
# example:
'filters': request.GET.get('filters', {})
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
The dump endpoint is in ckanext/datastore/controller.py around line 22; start by comparing its query handling with datastore_search. Determine which datastore_search parameters should be passed through, including filters, limit, and offset, and verify that filtered requests produce the intended CSV output.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100