Skip to main content

Utility for moving data between CKAN instances using the API

Project description

Overview

Utility to migrate data between two CKAN instances using the CKAN api.

Getting Started

config/transformationConfig.json

This file currently contains the configuration that is being used at DataBC for the transformation between prod and test. A detailed description of this file is available here

Running

Env vars:

Configure the following env vars:

  • export CKAN_API_KEY_DEST=<api key for the destination instance, should be for a ckan sysadmin user>
  • export CKAN_URL_TST=
  • export CKAN_API_KEY_SRC=<api key for source destination instance, should be sysadmin>
  • export CKAN_URL_SRC=
  • export CKAN_DO_NOT_WRITE_URL=<usually the source instance, adds checks to make no methods that make changes are not being called on this instance>
  • export CKAN_NEW_USER_PSWD=
  • export CKAN_TRANSFORMATION_CONFIG=

Optional env vars, These are optional vars that should NOT be used in production/ deployed versions of this code. They are parameters that help with the debugging of this code.

  • export LOG_FILE_PATH= if LOG_FILE_PATH is not set then logging will only go to console.
  • export DUMP_DEBUG_DATA= When the debug param is set the objects returned by the rest api get cached. Subsequent runs of the script will re-use cached objects. Also dumps comparison object data to help debug issues with change control.

Finally, environment variables are defined in the constants, making them easy to change

Running

After the module has been installed:

pip install bcdc2bcdc

and the the env vars described above have been set, you can run the script using

python3 runBCDC2BCDC.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bcdc2bcdc-0.0.10.tar.gz (69.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bcdc2bcdc-0.0.10-py3-none-any.whl (89.5 kB view details)

Uploaded Python 3

File details

Details for the file bcdc2bcdc-0.0.10.tar.gz.

File metadata

  • Download URL: bcdc2bcdc-0.0.10.tar.gz
  • Upload date:
  • Size: 69.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

File hashes

Hashes for bcdc2bcdc-0.0.10.tar.gz
Algorithm Hash digest
SHA256 c3192c295f851317be2f922b5ef11ad5f0d66e5c70f3d25a455b7f1fe2ca728c
MD5 dd7e952e857d53e59cea03fe8eebd86b
BLAKE2b-256 73784cc2010fb5d420f63a53a90610638a80652ce0861368200f36dee19c4f03

See more details on using hashes here.

File details

Details for the file bcdc2bcdc-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: bcdc2bcdc-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 89.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

File hashes

Hashes for bcdc2bcdc-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4694d14f480744f522b437157cdb92905c2fbd5a5448ea7f12f9a39f96e5ac
MD5 fdcd4b4a03fad4cd049177ab3fe3eda4
BLAKE2b-256 939fcb22b7b95df6044ad435a26ca35ef6a65ed6bc9f46f20827df6bc63d7215

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page