sem.rdfLoad( $location as String, [$options as String], [$http-opts as Node?], [$permissions as ValueIterator], [$collections as String], [$quality as xs.int?], [$forest-ids as String] ) as ValueIterator
This function inserts an RDF document from a specified location into the designated database. It also creates the graph metadata for the graph specified by the "graph=URI" or "override-graph=URI" option. This is an update function that returns the document URIs of inserted documents.
|$location||The location of the input file. If the file is not a recognized format, an exception is thrown.|
Parsing options: Only one base, or graph, or override-graph
option along with one format option (ntriple, nquad, turtle,
trig, n3, rdfxml, or rdfjson) is allowed. The graph and
override-graph options cannot be used together. Valid options
An options node as described for the function
|$collections||Additional collections to set on inserted documents. If you use the collections argument when inserting triples, no graph document will be created for these collections.|
|$quality||The quality setting for inserted documents.|
|$forest-ids||The forest-ids to use for inserted documents.|
sem:rdf-loadin the context of SPARQL Update can result in undefined behavior.
declareUpdate(); var sem = require("/MarkLogic/semantics.xqy"); sem.rdfLoad('C:/data/example.rdf', "rdfxml") => /triplestore/fbd28af1471b39e9.xml
declareUpdate(); var sem = require("/MarkLogic/semantics.xqy"); sem.rdfLoad( 'C:/data/books.ttl', ["turtle", "graph=http://marklogic.com/semantics/sb/books1/"], null, xdmp.permission("demo-reader", "read") ); => /triplestore/fbd28af1471b39e9.xml // permissions on graph for demo-reader now set to "read"