Datastore: Add interface for exporting custom formats
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 39
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently the datastore can export data in multiple formats (#3390) but some interesting ones are still missing (e.g. Excel, LibreOffice). During a discussion on the ckan-dev mailing list, @wardi suggested to allow implementations of additional export formats via an interface.
Here's how such an interface could look:
datastore_get_export_formats()would return a dict that maps format identifiers (e.g.xlsx) to dicts. The latter contain a UI-label for the format (e.g.{'label': 'Microsoft Excel XLSX'}).datastore_export(format, response, fields, options)would write the datastore fields to the response using the given format.optionsis a dict that contains additional options (e.g. thebomoption from ckan/ckan#3390).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing datastore export behavior and the proposed datastore_get_export_formats() and datastore_export(format, response, fields, options) entry points. Define how format identifiers, UI labels, response output, fields, and options—including bom—are represented, then verify that an additional format can be supplied through the interface.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100