Reputation: 117
I want to implement a user-defined boolean aggregation function in SPARQL and I am checking whether how easy/feasible is this in different SPARQL engines. In regards to Virtuoso, is it possible? If so, where could I find further information about it? By googling I found how to do it for SQL but not for SPARQL: http://docs.openlinksw.com/virtuoso/aggregates/
Thanks your attention and help, Luis
Upvotes: 3
Views: 206
Reputation: 9434
You're more than halfway there.
Virtuoso lets you use SQL functions, both built-in (bif:
) and user-defined (sql:
), within SPARQL queries, as discussed in the documentation:
A
SPARQL
expression can contain calls to Virtuoso/PL functions and built-in SQL functions in both theWHERE
clause and in the result set. Two namespace prefixes,bif
andsql
are reserved for these purposes. When a function name starts with thebif:
namespace prefix, the rest of the name is treated as the name of a SQL BIF (Built-In Function). When a function name starts with thesql:
namespace prefix, the rest of the name is treated as the name of a Virtuoso/PL function owned byDBA
with database qualifierDB
, e.g.,sql:example(...)
is converted intoDB.DBA."example"(...)
.
ObDisclaimer: OpenLink Software produces Virtuoso, and employs me.
Upvotes: 3