-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[WIP] Variable (with example) support #26
base: master
Are you sure you want to change the base?
Conversation
The idea is fine. However, this would mean that the template strings would not be valid queries by themselves. This is not a direction we wish to go into. However, that does not mean I am against including this in the code base. |
What did you have in mind for Scholia? One option we can do instead, is to record the SPARQL query as specific, but having the example QID itself the "template" variable, which gets translated into Another option is to have all relevant metadata in SPARQL comments in the existing Scholia SPARQL queries, and use that as primary information source. |
Well scholia uses ninja as templating language, which means the template is not yet a SPARQL query. What we are thinking about is more like we have a complete SPARQL query with certain variables and then use a VALUES clause at the end or other bindings to make this happen. e.g. we have a simple query to find all people with pets. SELECT *
{ ?person ex:hasPet ?pet } which is a query on it's own. Then the query to find my pet's would be SELECT *
{ex:JervenBolleman ex:hasPet ?pet } and to find people whom have a cool goldfish as pet would be SELECT *
{?people ex:hasPet ex:coolGoldFish } we think that the last two queries could be expressed as a version of a templated starting query. So we would express the queries like : template an existing query is suggesting a binding which changes the original query prior bindings, and offers suggestions to them. The original query remains a pure SPARQL query and we end up defining how values are pre-bound into them. With most effort spend on selecting examples, limit's and the shapes that the example need to fit into make the templated query into them. |
@egonw we already have a discussion in the sparql-examples repository about this kind of variables in template queries sib-swiss#32 The idea is that every query is a working query But some query could get a list of potential values for a variable. |
hi all, sorry for the silence on this one. December was pretty busy with a fundraising event around WikiPathways, and january busy for personal reasons. I am picking this up again. Thanks for the feedback! More asap. |
Working out an idea for Scholia.