Basics of Triple Loading
To load semantic triples, use -input_file_type rdf
and follow the instructions for loading a single file, all files in a directory, or a compressed file. For example, the following command loads triples files from the directory /my/data
.
# Windows users, see Modifying the Example Commands for Windows $ mlcp.sh import -username user -password password -host localhost \ -port 8000 -input_file_path /my/data -mode local \ -input_file_type rdf
You can use mlcp to load triples files in several formats, including RDF/XML, Turtle, and N-Quads. For a full list of supported formats, see Supported RDF Triple Formats in the Semantic Graph Developer’s Guide.
Note
Each time you load triples from a file, mlcp inserts new documents into the database. That is, multiple loads of the same input inserts new triples each time, rather than overwriting. Only the XQuery and REST API allow you replace triples.
Load triples data embedded within other content according to the instructions for the enclosing input file type, rather than with -input_file_type rdf
. For example, if you have an XML input document that happens to have some triples embedded in it, load the document using -input_file_type documents
.
You cannot combine loading triples files with other input file types.
If you do not include any graph selection options in your mlcp command, Quads are loaded into the graph specified in the data. Quads with no explicit graph specification and other kinds of triple data are loaded into the default graph. You can change this behavior with options. For details, see Graph Selection When Loading Quads or Graph Selection for Other Triple Types.
For details, see Loading Triples with mlcp in the Semantic Graph Developer’s Guide.