WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

SPARQLLoad[from]

is an update operator that can be applied to an RDFStore , which loads the graph located at from into the default graph.

SPARQLLoad[fromto]

loads the graph into the graph identified by to.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
See Also
Related Guides
Cite this Page

SPARQLLoad[from]

is an update operator that can be applied to an RDFStore , which loads the graph located at from into the default graph.

SPARQLLoad[fromto]

loads the graph into the graph identified by to.

Details and Options

  • SPARQLLoad can be used in SPARQLExecute to load data into a SPARQL endpoint.
  • from is usually a URL or a File that contains the graph.
  • Data from the destination graph is not removed.

Examples

Basic Examples  (1)

Wolfram Language code: Needs["GraphStore`"]

Data about countries:

Wolfram Language code: countryStore = ImportString[" prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix wa: <http://www.wolframalpha.com/input/?i=> prefix ex: <http://example.org/> wa:Entity%5B%22Country%22%2C%22Spain%22%5D rdfs:label \"Spain\"@en ; ex:population 46528024 . wa:Entity%5B%22Country%22%2C%22Hungary%22%5D rdfs:label \"Hungary\"@en ; ex:population 9778371 . ", "TriG"]

Create a "linkset" that links Wolfram and Wikidata entities:

Wolfram Language code: linkFile = File[CreateFile["links.ttl"]];
Wolfram Language code: WriteString[linkFile, " prefix wa: <http://www.wolframalpha.com/input/?i=> prefix wd: <http://www.wikidata.org/entity/> prefix owl: <http://www.w3.org/2002/07/owl#> wa:Entity%5B%22Country%22%2C%22Spain%22%5D owl:sameAs wd:Q29 . wa:Entity%5B%22Country%22%2C%22Hungary%22%5D owl:sameAs wd:Q28 . "]

Load the linkset into the default graph:

Wolfram Language code: countryStore = countryStore//SPARQLLoad[linkFile]

Query the population of Hungary using its Wikidata ID (Q28):

Wolfram Language code: countryStore//SPARQLQuery[" prefix wd: <http://www.wikidata.org/entity/> prefix owl: <http://www.w3.org/2002/07/owl#> prefix ex: <http://example.org/> SELECT * WHERE { wd:Q28 ^owl:sameAs / ex:population ?population . } "]

Delete the linkset:

Wolfram Language code: DeleteFile[linkFile]
Wolfram Research (2019), SPARQLLoad, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLLoad.html.

Text

Wolfram Research (2019), SPARQLLoad, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLLoad.html.

CMS

Wolfram Language. 2019. "SPARQLLoad." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLLoad.html.

APA

Wolfram Language. (2019). SPARQLLoad. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLLoad.html

BibTeX

@misc{reference.wolfram_2026_sparqlload, author="Wolfram Research", title="{SPARQLLoad}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLLoad.html}", note=[Accessed: 19-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_sparqlload, organization={Wolfram Research}, title={SPARQLLoad}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLLoad.html}, note=[Accessed: 19-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /