SPARQLValues["var",{val1,val2,…}]
binds the values vali to the variable "var".
SPARQLValues[{"var1","var2",…},{{val11,val21,…},…}]
binds the values valij to the variables "vari".
SPARQLValues
SPARQLValues["var",{val1,val2,…}]
binds the values vali to the variable "var".
SPARQLValues[{"var1","var2",…},{{val11,val21,…},…}]
binds the values valij to the variables "vari".
Examples
open all close allBasic Examples (1)
Needs["GraphStore`"]fruitGraph = GraphStore`RDFStore[{GraphStore`RDFTriple[URL["http://example.org/banana"],
URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], URL["http://example.org/Fruit"]],
GraphStore`RDFTriple[URL["http://example.org/banana"], URL["http://schema.o ... ttp://example.org/strawberry"],
URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"], URL["http://example.org/Fruit"]],
GraphStore`RDFTriple[URL["http://example.org/strawberry"], URL["http://schema.org/color"],
"red"]}, Association[]];Look up the color of bananas and cherries:
schema[s_] := URL["http://schema.org/" <> s];
ex[s_] := URL["http://example.org/" <> s];fruitGraph//SPARQLSelect[{
SPARQLValues["fruit", {ex["banana"], ex["cherry"]}],
RDFTriple[SPARQLVariable["fruit"], schema["color"], SPARQLVariable["color"]]
}]Properties & Relations (1)
Needs["GraphStore`"]Specify combined values for x and y:
RDFStore[{}]//SPARQLSelect[{
SPARQLValues[{"x", "y"}, {
{1, 2},
{4, 5},
{7, 8}
}]
}]Specifying values for x and y independently produces a different result:
RDFStore[{}]//SPARQLSelect[{
SPARQLValues["x", {1, 4, 7}],
SPARQLValues["y", {2, 5, 8}]
}]The latter is the outer join of bindings for both variables:
Flatten[Outer[
Join,
{<|"x" -> 1|>, <|"x" -> 4|>, <|"x" -> 7|>},
{<|"y" -> 2|>, <|"y" -> 5|>, <|"y" -> 8|>}
], 1]% == %%See Also
Related Guides
Text
Wolfram Research (2019), SPARQLValues, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html.
CMS
Wolfram Language. 2019. "SPARQLValues." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html.
APA
Wolfram Language. (2019). SPARQLValues. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html
BibTeX
@misc{reference.wolfram_2026_sparqlvalues, author="Wolfram Research", title="{SPARQLValues}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sparqlvalues, organization={Wolfram Research}, title={SPARQLValues}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLValues.html}, note=[Accessed: 13-June-2026]}