-
Notifications
You must be signed in to change notification settings - Fork 32
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
SPARQL/BASIL convention outside of query #305
Comments
@rosalinedehaan thank you very much for your response and willingness to look into compatibility between grlc and TriplyDB query notation. You appear to be modest about the advantages your solution has and only state that TriplyDB is different from GRLC and how GRLC could change things to be compatible. Would you please highlight the advantages of the TriplyDB query notation over the current grlc/basil approach? |
Hi @rosalinedehaan thanks for your suggestion. Pros: This would make sense as we already put quite some load into the query metadata. So having there the parameter-variable mappings is perfectly possible. It wouldn't force clients to stick to any variable convention. An interesting outcome though is that this would force us to put more thinking into a proper API-SPARQL mapping specification (e.g. nested declarations of variable types, enumerations, multiple values, etc.), something we've been postponing for quite some time. @c-martinez what do you think? Perhaps signaling to the wider community could help? |
Performing a mapping operation between TriplyDB and grlc queries may create unforeseen issues such as the user writing a query with variable name I think this discussion is about whether we want to include the API description in the SPARQL query itself, or whether we want to (optionally) de-couple the API description (eg as a decorator) and the SPARQL query part (the actual SELECT/CONSTRUCT). That being said, I agree that backwards compatibility is important here. Do you expect difficulties supporting both methods? (describing API variables via the variablenames themselves, and supporting it via a decorator syntax) |
Hi @rosalinedehaan, I think it would be technically possible to have a decorator which defines the variable naming convention (e.g. BASIL by default, something else when indicated by the decorator). I guess the motivation (having queries stored on Triply and executed via grlc) is a good one. I think we might need a design session to plan how this could be implemented and if that would meet your requirements and be backward compatible. @albertmeronyo -- maybe we can have a call sometime and discuss this? |
Hi @c-martinez, Sounds good to me, thank you very much. Could you keep me updated? |
After today's discussion, this is the spec we're targeting on both grlc's and Triply's side:
|
Problem / Use case
When using an API variable in GRLC the SPARQL/BASIL convention needs to be applied in the query string, thus requiring user to specify within the query which variable is the API variable and of what type it is (e.g. ?_genre_iri rather then just ?genre).
In TriplyDB this is currently implemented outside of the query string. The only requirement is that the API variable has the same name as the variable inside the query string. The API variable (outside of the query string) can then also be of a certain type an have a default value or a list with allowed values (that you define as enumerate, I think). I personally don't see the added value of using the BASIL convention in this case. But maybe I am missing something here.
The problem we have is that the BASIL convention inside of the query string makes compliance between GRLC queries and triplyDB queries complicated.
Desired Feature
We would like a feature that allows for the use of API variables without having to specify within the query string which variable is the API variable. A solution could be to have the BASIL convention in the GRLC comment section (and therefore query strings do not need to be adjusted). And therefore still include information about the variable type and indicate that it is an API variable.
I would like to hear your thoughts on this.
The text was updated successfully, but these errors were encountered: