The Rapper RDF Parser is a command-line utility that converts RDF data from one format to another.
The following example illustrates a typical user of rapper.
rapper -i rdfxml -o ntriples file.rdf > new-file.nt
This example shows rapper ingesting an RDF/XML file and producing the corresponding N-Triples file. The N-Triples file would then be loaded into AllegroGraph.
For details of Rapper formats and command-line options, see the Rapper documentation page or type rapper -h at the command line.
We recommend pre-processing your data using Rapper in two specific situations:
- When the data is in a form that AllegroGraph does not parse, such as RSS.
- When there is a massive amount of RDF/XML to load. AllegroGraph loads N-Triples much more quickly than RDF/XML. It is faster to have Rapper convert the RDF/XML into N-triple format before loading into AllegroGraph. (AllegroGraph can use multiple cores to load a single large N-triple or N-quad file. A single large turtle file is loaded by one core only. However, multiple turtle files are loaded by multiple cores. Data loading is described in Data Loading.)
If you are loading an RDF/XML file using the AllegroGraph Lisp client, you can use Rapper as an optional filter, making the conversion to N-Triples while the data is being loaded:
(load-rdf/xml <your-file> :use-rapper-p t)
This is a dedicated RDF/XML to N-Triples conversion. The conversion pipes data from rapper directly into AllegroGraph, which avoids clutting your disk with converted files. See load-rdf/xml for more information.