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

YAML vocab files #70

Merged
merged 8 commits into from
Apr 18, 2023
Merged

YAML vocab files #70

merged 8 commits into from
Apr 18, 2023

Conversation

mhauru
Copy link
Collaborator

@mhauru mhauru commented Apr 6, 2023

Switch to using JSON YAML as the file format for vocabulary table dumps. This circumvents the issue where CSV fails to distinguish between null and empty string.

The PR also adds more data into the src.dump that cause tests to fail when using CSV files (by having some NULL values in an integer column). While I was at it, I also added something that should cause tests to fail before #68 is merged (vocabulary tables with non-trivial FK constraints amongst each other).

Builds on #69, the diff is going to be nicer once that is merged.

Closes #65

@mhauru mhauru requested a review from Iain-S April 6, 2023 13:11
@mhauru
Copy link
Collaborator Author

mhauru commented Apr 6, 2023

Just noticed JSON can't deal with datetimes. Turning this back into a draft until that's fixed.

@mhauru mhauru marked this pull request as draft April 6, 2023 14:01
@mhauru mhauru changed the title JSON vocab files YAML vocab files Apr 6, 2023
@mhauru
Copy link
Collaborator Author

mhauru commented Apr 6, 2023

Switched from JSON to YAML to handle datetimes and other general python objects.

@mhauru mhauru marked this pull request as ready for review April 6, 2023 16:44
@mhauru mhauru changed the base branch from main to generator-dict April 12, 2023 09:35
@mhauru mhauru changed the base branch from generator-dict to main April 12, 2023 09:35
@Iain-S Iain-S self-assigned this Apr 17, 2023
@Iain-S
Copy link
Collaborator

Iain-S commented Apr 17, 2023

I added a timestamp column to concepts to check that the yaml files can handle date times in vocab files.

@mhauru mhauru merged commit a033aab into main Apr 18, 2023
@Iain-S Iain-S deleted the json-vocab branch April 18, 2023 15:44
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

Successfully merging this pull request may close these issues.

Deal with null values in vocabulary tables
2 participants