GraphStore`
GraphStore`

SPARQLProject

SPARQLProject["var"]

is a query operator that yields solutions containing only values for the variable "var".

SPARQLProject["newvar"expr]

yields solutions containing only the variable "newvar" whose value is computed from expr.

SPARQLProject[{vspec1,vspec2,}]

selects and computes values for multiple variables.

Details and Options

  • A RightComposition of operators SPARQLSelect[]/*/*SPARQLProject[]/* can be used in SPARQLExecute to query a SPARQL endpoint. Composition is also supported.
  • SPARQLProject[] can be applied to the result of a SPARQLSelect query.
  • In SPARQLProject[{,"newvari"expri,,"newvari+n"expri+n,}], SPARQLVariable["newvari"] can be used in expri+n to refer to the value of expri.

Examples

open allclose all

Basic Examples  (1)

Data about books:

Find books and compute their time since publication in years:

Properties & Relations  (1)

Solutions for two variables:

Project to variable "x":

The same using KeyTake:

Compute the square of "x":

The same using Query:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_sparqlproject, author="Wolfram Research", title="{SPARQLProject}", year="2020", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLProject.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_sparqlproject, organization={Wolfram Research}, title={SPARQLProject}, year={2020}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLProject.html}, note=[Accessed: 22-November-2024 ]}