Skip to content

How to export an agencies datasets as a data package

Export an agencies datasets into sub-folders including any hosted or referenced data files and a json file with metadata.

Learning outcomes

  • Be able to install the required tools to export the data.
  • Understand the command to run and what the output of data will be.

Requirements

Steps

  1. Make sure you have the CKANAPI CLI tool installed
  2. Make sure you have the jq and tr tools installed
  3. Run the command below replacing the properties in UPPERCASE with your own values.
ckanapi dump datasets $(ckanapi -r CKAN_URL action package_search q=organization:AGENCY_ID | jq .results[].name | tr -d '"') -r CKAN_URL -D PATH_TO_FILES

Last Updated: 25/09/2018 9:12am