-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
If a CKAN API version 3 URL is passed to DataKitten::Dataset, it makes the request, extracts the id and makes a second request to the version 2 endpoint, which it uses to extract metadata. Not only is this inefficient, but version 2 is also missing some fields available in 3. So far, I've noticed that schema and codelists are missing in data.gov.uk version 2 (which are useful in answering questions for ODC).
Example data.gov.uk dataset that has both a codelist & schema:
- version 2 URL: http://data.gov.uk/api/2/rest/dataset/gp-practices-and-surgeries
- version 3 URL: http://data.gov.uk/api/3/action/package_show?id=gp-practices-and-surgeries
The differences I'm aware of between the two versions are:
- Metadata in v3 is in the
resultfield, whereas in v2 metadata is the response itself extrasfield contains an array of key-value hashes in v3 ([{ key: "id", value: 1 }]), whereas in v2 it is a hash ({id: 1})
Reactions are currently unavailable