New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Licenses not imported correctly #62

Stephen-Gates opened this Issue Dec 6, 2017 · 3 comments


None yet
3 participants

Stephen-Gates commented Dec 6, 2017

When I upload this to this ckan site the licenses aren't unpacked correctly

screenshot 2017-12-06 22 19 03


This comment has been minimized.

GeraldGrootRoessink commented Jan 28, 2018

What seems to works partially (singular)
"license" : {
"type" : "CC-BY-4.0",
"url" : "",
"title" : "Creative Commons Attribution 4.0"


This comment has been minimized.

Stephen-Gates commented Jan 29, 2018


This comment has been minimized.


amercader commented Feb 8, 2018


Change the converter in ckan-datapackage-tools to support v1 spec.

I think we should still store the full DP licenses object. If we want to use CKAN's own license field logic will need to be a bit more complex, as we will need to make sure that the license exists in the internal registry, which can be customized depending of the site. If the DP license exists in the registry, set license_id, but CKAN only accepts one so we should choose the first one (My feeling is that 99% of times there will be only one anyway). So just to be on the safe side, we should still store licenses as an extra and use that if present when exporting to DP, so we don't lose any information.

So, to sum up:

  • When ingesting DP:
    • If licenses is present check if the first item exists in the licenses registry.
    • If so, set license_id
    • If it doesn't exist in the registry, or there is more than one license, store the licenses object as an extra, so instances with the datapackager extension can handle it as they see fit. They will need to take care of keep license_id (the default field) and the licenses extra in sync.
  • When exporting DP:
    • If there is a licenses extra, use that.
    • If license_id is present, use that to build the output licenses object.


0.5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment