SPARQLLoad[from]
from にあるグラフをデフォルトグラフにロードする,RDFStoreに適用可能な更新演算子である.
SPARQLLoad[fromto]
to で識別されるグラフにグラフをロードする.
SPARQLLoad
SPARQLLoad[from]
from にあるグラフをデフォルトグラフにロードする,RDFStoreに適用可能な更新演算子である.
SPARQLLoad[fromto]
to で識別されるグラフにグラフをロードする.
詳細とオプション
- SPARQLExecuteでSPARQLLoadを使って,SPARQL Endpointにデータをロードすることができる.
- from は,通常は,グラフを含むURLまたはFileである.
- 目的とするグラフからのデータは削除されない.
例題
例 (1)
Needs["GraphStore`"]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"]WolframとWikidataの実体を繋ぐ"linkset"を作る:
linkFile = File[CreateFile["links.ttl"]];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 .
"]countryStore = countryStore//SPARQLLoad[linkFile]Wikidata ID (Q28)を使って,ハンガリーの人口についてのクエリを行う:
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 .
}
"]DeleteFile[linkFile]関連するガイド
テキスト
Wolfram Research (2019), SPARQLLoad, Wolfram言語関数, 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: 15-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: 15-August-2026]}