datopian / ckanext-versioning

Deprecated. See https://github.com/datopian/ckanext-versions. ⏰ CKAN extension providing data versioning (metadata and files) based on git and github.
https://tech.datopian.com/versioning/
GNU Affero General Public License v3.0
7 stars 4 forks source link

Converting from CKAN metadata <=> Frictionless metadata #7

Closed rufuspollock closed 4 years ago

rufuspollock commented 4 years ago

As part of saving to and from the (Git + datapackage.json) MetaStore layer we need to convert from CKAN metadata to Frictionless metadata and vice versa:

CKAN <=> Frictionless 

Key question: How do we convert from CKAN metadata structures to Frictionless? And vice versa?

Tasks

Analysis

What's the relation to package_show

A. What i get by calling package_show is essentially identical (modulo extras expansion) to what is in datapackage.json B. It's different (and if so, what are the differences?)

Ans: they are different

package_show has much more than what is in core Package object. What we store in datapackage.json is approx what is in Package object (with dereferencing of relations to some extent)

Example: datastore_active is on Resources in package_show but not in Resource object (? tbc)

rufuspollock commented 4 years ago

FIXED. See https://github.com/frictionlessdata/frictionless-ckan-mapper and https://github.com/frictionlessdata/frictionless-ckan-mapper/issues/19