This wiki has been archived and is now read-only.


From SPARQL Working Group
Jump to: navigation, search

Feature: Scalar Expressions in CONSTRUCT

Expressions should be available in construction patterns, like variables.

Feature description

Now SPARQL is not sufficient to create sets of triples whose nodes are not present in the text ofthe query or in the result set. It is unusual for a language to provide all expressions of relational algebra but still be insufficient to add 2 and 2 and return the result.


CONSTRUCT { ?ol <quantity> ?qty ; <price> ?price ; <total> `?qty * ?price` } ...
CONSTRUCT { ?list `iri(bif:concat(str(rdf:_), str(?n)))` ?nthvalue } ...

Existing Implementation(s)

  • Virtuoso

Existing Specification / Documentation


Backquote is not in use in SPARQL grammar so backward-compatibitity is guaranteed.

Links to postponed Issues

Has this extension/use case some history in the group already? I.e. are there posponed issues or archived mail-threads related to this originating from DAWG?

Related Features

IRI() built-in function whould be really nice if coupled with expressions in CONSTRUCT.


  • OpenLink

Use cases

Generally useful.