Re: SPARQL 1.1. BINDINGS + FILTER

On 04/05/12 07:33, Benjamin Nowack wrote:
>
> On 5/3/12 11:03 PM, Andy Seaborne wrote:
>> Injecting in the right place can be quite cheap - the query string upto
>> that point, the syntax, and the query string after that point. There is
>> only one point to put variables in.

> Our users are already struggling to write SPARQL 1.0 queries. Most query
> templates are just a single GP with an occasional FILTER and/or REGEX
> thrown in. They basically just write a query and then define which
> variables are meant to be exposed by our API as parameters. We probably
> can't ask them to inject the value placeholders themselves. The BINDINGS
> approach worked in almost all cases.

... beware filters don't work as your users may expect.

This was Aidan's and Stephen's comments

http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2012Mar/0018.html

http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2012Apr/0010.html

and motivated the change.

Do you want one set of values for the template in one query execution?

>
>> ARQ also allows for rewrite of parsed queries: a query can be rewritten
>> (either the abstract syntax tree or the SPARQL algebra) as replacing
>> specific variables by values prior to execution (this is even in the
>> public API). Discuss with your implementation of choice.

> ARQ is our implementation of choice :) If it's as simple as adding some
> parameters to the SPARQL API call (we only have HTTP access to the
> backend), we'd have a perfect solution. Will look into that, thanks for
> the hint!

It was on the list of features initially considered for work item with a 
skew towards the compilation efficiency side of parametrized queries:

http://www.w3.org/2009/sparql/wiki/Feature:Parameters

nearby:
http://www.w3.org/2009/sparql/wiki/Feature:Query_by_reference

It didn't make the cut.

	Andy

>
> Cheers,
> Benji
>
>>
>> Andy
>

Received on Friday, 4 May 2012 12:24:26 UTC