CLARIAH / COW

Integrated CSV to RDF converter, using CSVW and nanopublications
MIT License
46 stars 9 forks source link

It's not possible to give null values with the @list property #96

Closed melvinroest closed 4 years ago

melvinroest commented 4 years ago

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:

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.

{    
    "@id": "https://iisg.amsterdam/test.csv/column/some_column_name",
    "name": "some_column_name",
    "titles": ["some_column_name"],
    "dc:description": "some_column_name",
    "datatype": "string",
    "null": {"@list": [{"name": "yet_another_column", "null": ["this_could_be_any_word", "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.

melvinroest commented 4 years ago

While there is a bug that interferes with this feature (see #98), it's a completely different bug from a technical perspective.

The particular bug that was associated to this issue has been fixed.