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:
The differences I'm aware of between the two versions are:
- Metadata in v3 is in the
result field, whereas in v2 metadata is the response itself
extras field contains an array of key-value hashes in v3 ([{ key: "id", value: 1 }]), whereas in v2 it is a hash ({id: 1})
If a CKAN API version 3 URL is passed to DataKitten::Dataset, it makes the request, extracts the
idand 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 thatschemaandcodelistsare 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:
The differences I'm aware of between the two versions are:
resultfield, whereas in v2 metadata is the response itselfextrasfield contains an array of key-value hashes in v3 ([{ key: "id", value: 1 }]), whereas in v2 it is a hash ({id: 1})