frictionless-r
frictionless-r copied to clipboard
How to support Data Package versions and version changes in frictionless-r
trafficstars
Data Package is now versioned, something that can be indicated at the $schema property. Ideally, frictionless-r supports (the properties that makes sense) for all versions (currently v1 and v2) and doesn't require users to install an older version of frictionless-r to support previous versions of Data Package
Reading
Ideally, when reading a data package, frictionless-r:
- Detects the version of
package,resource,dialect,schema - Assumes v1 if not provided in
schema(cf. specs) - Does not communicate version, but can provided it with detected function
version() - Silently (!) ignores properties that are not part of the version (e.g.
categoricalin v1): note, this may be frustrating to the user, who should know to update$schemato v2, but warning for all of these is hard to provide. - Warns if a version is not recognized and reverts to the latest version supported by frictionless-r
Writing
Ideally, when writing a data package, frictionless-r:
- Always writes to the latest version supported by frictionless-r? This can be frustrating to users who want to retain the version.
- Alternatively,
write_package()allows to specify a version, and older versions can be gradually phased out.
Examples and test
- Update example to v2
- Provide test files for v1