CLARIAH / COW

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

Why are two triples created, one with value and one empty? #124

Closed Thunnisvanoort closed 2 years ago

Thunnisvanoort commented 2 years ago

The following section in the json should result in a single triple, but it generates two: one with the desired value and one with an empty value. Why?

So this:

{ "virtual": true, "aboutUrl": "{adrescode}", "propertyUrl": "dbo:residence", "csvw:value": "{sl_tot}_enslaved_people" },

Generates these two triples, for example:

afbeelding

The first triple is the desired one, that gives the value (3), the second one is redundant and comes without value, but I do not know how to get rid of it.

WR46-220113TST.csv-metadata - 20220224.txt

rlzijdeman commented 2 years ago

Hi, two triples are created, because you added a propertyUrl and valueUrl to the automatically generated json file and you created another manually with virtual columns:

<auto generated and improved part> 
  {
    "@id": "https://www.ru.nl/slavenregisters/WR46-220113TST.csv/column/adrescode",
    "name": "adrescode",
    "titles": [
     "adrescode"
    ],
    "dc:description": "Code for the address: combination of neighbourhood designation plus house number (without extension)",
    "datatype": "string",
    "propertyUrl": "dbo:residence",
    "csvw:value": "person/{ID}"
   },
<manually added part>
{
    "virtual": true,
    "aboutUrl": "{adrescode}",
    "propertyUrl": "dbo:residence",
    "csvw:value": "{sl_tot} enslaved people",
    "null": [""]
   },

Based on your intentions you can either delete the first or the letter (i.e. everything inside the {} including the {}. Hope this helps. NB: virtual columns are only necessary if you would like to specify multiple triples for 1 column or you want to create triples for something for which there is no column in your data.