Extension Data Proxy


Extension Basics

Title
Data Proxy
Name
ckanext-dataproxy
Type
Public extension
Description
CKAN extension that enables previewing data from remote databases via SQLAlchemy, compatible with datastore by masking the dataproxy resource as a datastore resource.
CKAN versions
Download-Url (zip)
Last commit
8 years ago (2017-06-21 04:17:34)
Url to repo
Category
Data Management & Quality


Background Infos

Description (long)
Show details

ckanext-dataproxy

ckanext-dataproxy is a CKAN extension that enables previewing data from remote databases via SQLAlchemy. The extension is compatible with datastore by masking the dataproxy resource as a datastore resource so it could be requested via /api/3/action/datastore_search or previewed in-browser with recline-preview.

This allows CKAN to use foreign data wrappers as a source for the datastore.

Installation

NB! This module is developed for CKAN v2.2.x and v2.5.x, compatibility with other versions is not ensured.

  1. Clone the repository:
cd /usr/lib/ckan/default/src
git clone https://github.com/cphsolutionslab/ckanext-dataproxy.git
cd ckanext-dataproxy
  1. Activate your virtual environment:
. /usr/lib/ckan/bin/activate
  1. Install requirements (It is not required to install drivers for databases you don’t plan to proxy):
pip install -r requirements.txt

Additional packages may be required to compile the database-specific drivers. For Ubuntu:

sudo apt-get install build-essential libmysqlclient-dev freetds-dev
  1. Install the plugin:
python setup.py develop
  1. Set the dataproxy secret in your CKAN settings file (e.g. /etc/ckan/default/production.ini):
ckan.dataproxy.secret = c9f56fdfd12ee615f3d858...  # Use a random secret

Generate a random secret:

echo "import hashlib ; from uuid import uuid4 ; print hashlib.sha256(str(uuid4())).hexdigest()" | python -

Enable on CKAN 2.2.x

Enable the extension by appending dataproxy to ckan.plugins:

ckan.plugins = stats text_preview ... dataproxy

Enable on CKAN 2.5.x

Enable the extension by appending dataproxy and dataproxy_view to ckan.plugins:

ckan.plugins = stats text_preview ... dataproxy dataproxy_view

Then append dataproxy_view to ckan.views.default_views:

ckan.views.default_views = image_view ... dataproxy_view

Usage

See the wiki for detailed usage instructions: - Usage with CKAN 2.2.x - Usage with CKAN 2.5.x

Version
0.2.0
Version release date
(not set)
Contact name
cphsolutionslab
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

Requires database drivers for the databases you want to proxy (MySQL, MSSQL, etc.). Requires a secret key for AES256 encryption.

Plugins to configure (ckan.ini)
dataproxy dataproxy_view
CKAN Settings (ckan.ini)
# ckan.dataproxy.secret = YOUR_SECRET_KEY
DB migration to be executed
(not set)
<< back to Extensions