Skip to content
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

Add foreign key constraints to CSV-W output for local codelists #69

Closed
robons opened this issue Jul 6, 2021 · 0 comments
Closed

Add foreign key constraints to CSV-W output for local codelists #69

robons opened this issue Jul 6, 2021 · 0 comments
Assignees

Comments

@robons
Copy link
Contributor

robons commented Jul 6, 2021

The CSV-W spec allows you to define foriegn key constraints so that the codes in one table are guaranteed to be deined in a separate table. We can use this functionality to ensure that all of the codes used in a CSV are defined in the relevant code list.

For simplicity in the prototype/MVP we're only planning on doing this validation against locally defined code-lists. Once we have done the work necessary to serialise codelists, we can add foreign key constraints to the CSV-W metadata file which will enforce the relationship.

As part of this task you should write a behave test to ensure that the foreign keys are correctly checked when csv-lint runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants