Replies: 4 comments
-
That's a great proposal! Indeed, support for functions that return a single output is easy in SPARQL. In the past, I have used the Jena magic property Actually, it is not impossible but very very cumbersome, see this, for example:
The above snippet calls the function many times but each block catches only the Nth element (the In summary, this is definitely worth exploring :) [1] https://jena.apache.org/documentation/query/library-propfunc.html |
Beta Was this translation helpful? Give feedback.
-
This is intriguing, do you think this is possible without changing the SPARQL syntax? How do you think this would look like from the user point of view? |
Beta Was this translation helpful? Give feedback.
-
Hi, For example, the following query
gives
|
Beta Was this translation helpful? Give feedback.
-
Maybe better closing the issue and convert it to a discussion |
Beta Was this translation helpful? Give feedback.
-
The use case is that I am dealing with a CSV whose values themselves are sometimes comma-separated strings, e.g.
Ideally, I would want to call a wrapper function of
String.split()
on the last value and generate a URI for each material. However, we know SPARQL is not well-suited for loops and iterators. At the same time this may be an expectedly frequent need for someone who wants to use SPARQL-Anything's CONSTRUCT to re-engineer data into RDF.One can think of generating a structure similar to a VALUES table, but at execution time and with some clever planning to ensure they are evaluated before the respective bindings are generated.
Would this be worth discussing?
Beta Was this translation helpful? Give feedback.
All reactions