New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rdflib.plugins.sparql.CUSTOM_EVALS["exampleEval"] = customEval #1
Comments
Hi @rchateauneu, thanks for the feedback! I think that should be possible relatively easily, and that would be a required to enable full use of RDFLib custom evals Currently I focused on implementing custom functions because that was my use-case, but enabling it also for BGP would be better cf. calling the 2 solutions would come to my mind here:
Solution 1 is a must-have, that would allow to cover all use-cases I don't think of, I guess that's the solution you'll prefer? And we can also have both in the end: user-friendly "just define your functions", and flexible "rewrite everything by yourself" I will look into it when I have some time, but feel free to send a pull requests if you want to fix it asap! I tried the SPARQL endpoint federated queries from Virtuoso (Jena based) and Ontotext GraphDB (RDF4J based) and they were working, I don't think I tried Blazegraph (which is the triplestore used by Wikibase). I would expect it to work, but you never know... |
Thanks for the answer. What I wish it to create a Sparql endpoint usable from a Wikidata query such as these ones: Any implementation would be OK as long as I can implement the specific feature of accessing the BGP from part.triples, add more triples to ctx.graph and finally call evalBGP(ctx, part.triples). |
Hi @rchateauneu, I added the option to pass directly the custom evaluation, released in 0.1.5 You can find an example to use it there: https://github.com/vemonet/rdflib-endpoint#-or-directly-define-the-custom-evaluation Let me know if it is working as expected for you! |
I would like to know if this is possible to implement this kind of custom evaluation function, such as in this example:
Source code for examples.custom_eval
Also, do you please know if this would work in a federated query from Wikidata or Wikibase ? Thanks.
The text was updated successfully, but these errors were encountered: