Webstore
From CKAN
Webstore provides a structured data store built on a relational database backend. It can be used standable but also integrates closely with CKAN in various ways (see below).
Contents |
webstore (Software)
- Documentation: http://webstore.readthedocs.org/en/latest/
- Code: https://github.com/okfn/webstore
webstore.thedatahub.org
The data hub instance of webstore shares authentication with thedatahub.org; you can just use your credentials from there to log in. API keys are not supported yet.
- available at: webstore.thedatahub.org
To see a simple example, here are the first 10 lines of a budget dataset:
You can do some nice tricks on this (https://github.com/okfn/webstore has more), e.g.:
- http://webstore.thedatahub.org/pudo/tests/italy_sample/distinct/function
- http://webstore.thedatahub.org/pudo/tests/italy_sample/row/5
If you don't like the ugly HTML, use CSV or JSON:
http://webstore.thedatahub.org/pudo/tests/italy_sample.json
The service allows users to upload to their own namespace, authentication is delegated to ckan.net (erm, thedatahub.org), so your normal credentials should work if put into an HTTP Basic header.
Integration with CKAN
- Authentication can be delegated to CKAN (as ckan.py in webstore code)
- We use webstore for preview and qa function
- CKAN can be configured to auto-upload to webstore, see Integrating Webstore and CKAN for details on how this can done automatically.
Convention for Storing CKAN Datasets
We now need to work out some conventions for how to store data from datasets registered on a CKAN instance into a webstore.
Here's a first proposal. It is motivated by the use case of automatically putting data into the webstore so that we an API available as per CREP 4.
- There is a designated user for the CKAN instance. Suggest using the CKAN site_id variable (which is usually the domain name). So for thedatahub.org the username would be thedatahub.org. (Note: given current authz for webstore.datahub.org based on ckan this means you need a thedatahub.org user on thedatahub.org ...)
- Each resource being converted gets its own database. Name the database after the resource id.
- Store this info back onto the resource in your CKAN instance. Suggest two resources fields:
- webstore_url
- webstore_last_updated