VOS.VirtBulkRDFLoaderExampleSingle

  • Topic
  • Discussion
  • VOS.VirtBulkRDFLoaderExampleSingle(Last) -- DAVWikiAdmin? , 2017-06-13 05:44:37 Edit WebDAV System Administrator 2017-06-13 05:44:37

    Example for Single RDF Source File Upload

    The following example demonstrates how to upload single RDF source file using the Bulk Loading Sequence.

    1. Assuming there is a folder with name "tmp" in your FS and it is under a directory specified in the DirsAllowed param defined in your virtuoso ini file.
    2. Also assume in the folder "tmp" there is a file named "kidehen.n3" that contains:

      <http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/sioc/ns#User> . <http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this> <http://www.w3.org/2000/01/rdf-schema#label> "Kingsley" . <http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this> <http://rdfs.org/sioc/ns#creator_of> <http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/weblog/kidehen@openlinksw.com%27s%20BLOG%20%5B127%5D/1300> .

    3. Make sure the Bulk Loading script is executed.
    4. Register the file "kidehen.n3" with graph IRI "http://kidehen.com#":

      SQL>ld_dir ('tmp', 'kidehen.n3', 'http://kidehen.com#'); Done. -- 90 msec.

    5. Create in the "tmp" folder an empty file with name: kidehen.ext.graph
    6. Edit the kidehen.ext.graph by adding the graph IRI, so the content of the file to be:

      http://kidehen.com#

    7. Finally execute:

      SQL>rdf_loader_run (); Done. -- 100 msec.

    8. As result on the Server console should be shown notification for the loading is complete:

      10:21:50 PL LOG: Loader started 10:21:50 PL LOG: No more files to load. Loader has finished,

    9. To check the inserted triples for the given graph, execute:

      SQL>SPARQL SELECT * FROM <http://kidehen.com#> WHERE { ?s ?p ?o } ; s p o VARCHAR VARCHAR VARCHAR _______________________________________________________________________________ http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://rdfs.org/sioc/ns#User http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this http://www.w3.org/2000/01/rdf-schema#label Kingsley http://www.openlinksw.com/dataspace/kidehen@openlinksw.com#this http://rdfs.org/sioc/ns#creator_of http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/weblog/kidehen@openlinksw.com%27s%20BLOG%20%5B127%5D/1300 3 Rows. -- 10 msec.