SPARQLCopy[g1,g2]
is an update operator that can be applied to an RDFStore, which copies the contents of the graph identified by g1 into the graph identified by g2.
SPARQLCopy
SPARQLCopy[g1,g2]
is an update operator that can be applied to an RDFStore, which copies the contents of the graph identified by g1 into the graph identified by g2.
Details and Options
- SPARQLCopy can be used in SPARQLExecute to copy a graph in a SPARQL endpoint.
- Possible values for the gi are:
-
URL["iri"] graph identified by the given identifier "Default" default graph - The graph identified by g2 is cleared before data is inserted.
Examples
Basic Examples (1)
Needs["GraphStore`"];Import a catalog of paintings:
catalogStore = ImportString["
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix ex: <http://example.org/>
ex:LandschaftMitOlivenbaumen
rdfs:label \"Landschaft mit Olivenb\\u00e4umen\"@de ;
schema:author ex:vanGogh .
ex:DerSamann
rdfs:label \"Der S\\u00e4mann\"@de ;
schema:author ex:vanGogh .
ex:backup\\/2018-07-26 {
ex:LandschaftMitOlivenbaumen
rdfs:label \"Landschaft mit Olivenb\\u00e4umen\"@de ;
schema:author ex:vanGogh .
ex:leMoulinDeLaGalette
rdfs:label \"Le Moulin de la Galette\"@fr ;
schema:author ex:vanGogh .
}
", "TriG"]Restore the default graph from a backup stored in a named graph:
catalogStore = catalogStore//SPARQLCopy[URL["http://example.org/backup/2018-07-26"], "Default"]Review the labels of paintings in the default graph:
catalogStore//SPARQLSelect[RDFTriple[RDFBlankNode[], URL["http://www.w3.org/2000/01/rdf-schema#label"], SPARQLVariable["label"]]]Related Guides
Text
Wolfram Research (2019), SPARQLCopy, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLCopy.html.
CMS
Wolfram Language. 2019. "SPARQLCopy." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLCopy.html.
APA
Wolfram Language. (2019). SPARQLCopy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLCopy.html
BibTeX
@misc{reference.wolfram_2026_sparqlcopy, author="Wolfram Research", title="{SPARQLCopy}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLCopy.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sparqlcopy, organization={Wolfram Research}, title={SPARQLCopy}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLCopy.html}, note=[Accessed: 13-June-2026]}