Introduction
The Rapper RDF Parser is a command-line utility that converts RDF data from one format to another.
Example
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.
Usage
For details of Rapper formats and command-line options, see the Rapper documentation page or type rapper -h at the command line.
Discussion
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 Turtle or 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.
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.