In previous versions of CoW, it was possible to specify your own null values in the metadata.json file. It could be done in two ways:
provide an array (this still works). Example: "null": ["999", "", "etc", "other_values", "other_values"]
provide an object with the @list property (this doesn't work). Example: "null": {"@list": [{"name": "qyear", "null": [""]}]}
What was expected
That both methods work.
How to reproduce
Install CoW via Github (2020 branch at the time of writing) and build a metadata.json file with python3 src/csvw.py build test.csv
Alter one of the JSON columns with the snippet below.
Note: the column names: some_column_name, yet_another_column could be any names. This is also the case for the null values this_could_be_any_word and another_word.
Then run the conversion with python3 src/csvw.py convert test.csv and note that the values that should be considered as null values, and thus ignored, are not ignored.
What happened
In previous versions of CoW, it was possible to specify your own null values in the
metadata.json
file. It could be done in two ways:"null": ["999", "", "etc", "other_values", "other_values"]
@list
property (this doesn't work). Example:"null": {"@list": [{"name": "qyear", "null": [""]}]}
What was expected
That both methods work.
How to reproduce
Install CoW via Github (
2020
branch at the time of writing) and build ametadata.json
file withpython3 src/csvw.py build test.csv
Alter one of the JSON columns with the snippet below.
Note: the column names:
some_column_name
,yet_another_column
could be any names. This is also the case for the null valuesthis_could_be_any_word
andanother_word
.Then run the conversion with
python3 src/csvw.py convert test.csv
and note that the values that should be considered as null values, and thus ignored, are not ignored.