Skip to main content

Using MarkLogic Content Pump (mlcp)

Graph Selection for Other Triple Types

When loading triples (rather than quads), you can use the following command line options to control the graph into which your triples are loaded:

  • -output_graph

  • -output_collections

The following table summarizes the effect of various option combinations when importing triples with mlcp. For quads, see Graph Selection When Loading Quads.

Graph Options

Description

none

Load triples into the default graph (http://marklogic.com/semantics#default-graph).

-output_graph

Load triples into the specified graph.

output_collections

Load triples into the graph specified as the first (or only) collection; also add triples to any additional collections on the list.

-output_graph with -output_collections

Load triples into the graph specified by -output_graph and also add them to the specified collections.

For more details, see Loading Triples with mlcp in the Semantic Graph Developer’s Guide.

For example, if you use a command similar to the following load triples 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.nt -mode local \
    -input_file_type rdf

Then the table below illustrates how the various graph related options affect how the triples are loaded into the database:

Graph Options

Result

none

Graph: http://marklogic.com/semantics#default-graph

-output_graph /my/graph

Graph: /my/graph

-output_collections "aa,bb,cc"

Graph: aa. All triples also added to collections bb and cc

-output_graph /my/graph -output_collections "bb,cc"

Graph: /my/graph. All triples also added to collections bb and cc