Blazegraph Data Loader

492 Views Asked by At

I try to import some triple into the Blazegraph data base, whereas all triple w/o data type get loaded.

But triples having e.g. ^^xsd:date format get not loaded?!

Does anyone know how to deal with that issue?

Examples not being loaded:

<http://localhost:9999/blazegraph/namespace/kb/oPbZa6d9xntUXB><http://localhost:9999/blazegraph/namespace/kb/CREATION_DATE>"2015-08-24"^^xsd:date .
<http://localhost:9999/blazegraph/namespace/kb/oPbZa6d9xntUXB><http://localhost:9999/blazegraph/namespace/kb/S4_PROP_CLASS>"02"^^xsd:int . 

Examples being loaded (see line two, the language tag works also properly):

<http://localhost:9999/blazegraph/namespace/kb/oPbZa6d9xntUXB><http://localhost:9999/blazegraph/namespace/kb/IMPORT_ID>"20000" .
<http://localhost:9999/blazegraph/namespace/kb/oPbZa6d9xntUXB><http://localhost:9999/blazegraph/namespace/kb/OBJECT_TYPE>"S4_DFTRevision"@en-US .
<http://localhost:9999/blazegraph/namespace/kb/oPbZa6d9xntUXB><http://localhost:9999/blazegraph/namespace/kb/ITEM_ID>"DPDFT-60000395" .

The file is loaded by:

java -cp blazegraph.jar com.bigdata.rdf.store.DataLoader -defaultGraph http://example.org -namespace kb fastload.properti
es ./couchexport.nt

Why cannot the date format be attached as it is possible by blazegraph user interface: http://localhost:9999/blazegraph/#update

2

There are 2 best solutions below

0
Spooky Fox On

I tried with the turtle format (*.ttl) again and it worked. I guess the format *.nl needs another format in this matter?!

0
nvbach91 On

You cannot use prefixes like xsd:, rdfs:, etc. in a n-triples (*.nt) file. You must use the explicit full-length IRIs even for those datatype annotations. E.g.:

<http://example.org/resource1>
  <http://example.org/hasDate>
    "2024-02-23"^^<http://www.w3.org/2001/XMLSchema#date> .

<http://example.org/resource1>
  <http://example.org/property1>
    "123"^^<http://www.w3.org/2001/XMLSchema#integer> .

However, you can use prefixes in turtle (*.ttl) files, also some of the values don't even need explicit datatype annotations. That's why it worked.

@prefix ex: <http://example.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:resource1 ex:hasDate "2024-02-23"^^xsd:date .
ex:resource1 ex:property1 123 .