Custom SPARQL Aggregation Functions in Virtuoso

I want to implement a custom boolean aggregation function in SPARQL and I am checking how easy / possible it is in different SPARQL engines. As for Virtuoso, is it possible? If so, where can I find more information on this? By googling I found how to do this for SQL but not SPARQL: http://docs.openlinksw.com/virtuoso/aggregates/

Thanks for your attention and help, Luis

+3


source to share


1 answer


You're more than halfway there.

Virtuoso allows you to use SQL functions, both inline ( bif:

) and custom ( sql:

), in SPARQL queries, as discussed in the documentation :



A SPARQL

expression can contain Virtuoso / PL function calls and built-in SQL functions in both the clause WHERE

and the result set. There are two namespace prefixes reserved for this purpose, bif

and sql

. When a function name begins with a namespace prefix bif:

, the rest of the name is treated as a SQL BIF (Inline Function) name. When a function name begins with a namespace prefix sql:

, the rest of the name is treated as the name of a Virtuoso / PL function owned DBA

with a database classifier DB

, for example, sql:example(...)

converted to DB.DBA."example"(...)

.

ObDisclaimer: OpenLink Software produces Virtuoso , and uses me.

+3


source







All Articles