Hi,
I like the native SPARQL engine and I was wondering, if it is possible to integrate the option from rdflib to create own functions like this:
from rdflib.plugins.sparql.operators import custom_function
FN = Namespace("
https://example.org/fn#")
@custom_function(FN.someFunction)
def some_function(s):
result = do_sth_with_s(s)
return result
And then use it e.g. like this:
sparql_query= """
PREFIX fn: <
https://example.org/fn#>
SELECT ?s ?o WHERE {
?s a ?o .
FILTER(?o > fn:someFunction(?s))
}
"""
This would be a great feature for me!