Bulk Loading of RDF Source Files into one or more Graph IRIs
This document details how large RDF large data sets files can be bulk uploaded into Virtuoso. The data sets can consist of multiple files loaded into a single or multiple graphs.
- Execute this script, which contains the Bulk Loader Procedure and Sub-procedures, against the Virtuoso Server using the command line
isqlprogram. - Register the file(s) to load by running the following from
isql:
SQL> ld_dir ('<source-filename-or-directory>', '<file name pattern>', 'graph iri');
e.g.,
SQL> ld_dir ('/path/to/files', '*.n3', 'http://dbpedia.org');
- Setup the Graph IRI names by creating a file of the following form in the source directory where the datasets are located:
<source-file>.ext.graph
e.g.,
my.file.ext.graph
- Place the graph IRI in the file, e.g.,
http://dbpedia.org. - If all RDF source data is to end up in a single Graph IRI, the file should be named
global.graph - Finally, perform Bulk Data Load by executing:
SQL> rdf_loader_run ();