ckan / ckan/ideas

Datastore: Add interface for exporting custom formats

Open
#195 6 comments 0 reactions 0 assignees View on GitHub

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. options is a dict that contains additional options (e.g. the bom option from ckan/ckan#3390).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.