Hello,
I have a SPARQL query where I want to substitute a value in its WHERE clause. I tried following the documentation for substitute_variable (rendered docs here for today's release-state), and got a runtime error while unwrap-ing, NotExistingSubstitutedVariable.
I found three enum variants when searching for that symbol (query results here), and they each indicate this:
If a variable present in the given initial substitution is not present in the SELECT part of the query
I admit I'm not familiar with the use case where variable substitution would happen on something in the SELECT clause of a SPARQL query. However, I am comfortable running substitutions on variables in the WHERE clause with other frameworks.
Is there another mechanism available that would let me do so? And, is this the intended design & constraint of substitute_variable? The doc string reads:
Substitute a variable with a given RDF term in the SPARQL query.
From that, I'd guess that anywhere in the query would be a fair target for substitution.
Hello,
I have a SPARQL query where I want to substitute a value in its
WHEREclause. I tried following the documentation forsubstitute_variable(rendered docs here for today's release-state), and got a runtime error whileunwrap-ing,NotExistingSubstitutedVariable.I found three
enumvariants when searching for that symbol (query results here), and they each indicate this:I admit I'm not familiar with the use case where variable substitution would happen on something in the
SELECTclause of a SPARQL query. However, I am comfortable running substitutions on variables in theWHEREclause with other frameworks.Is there another mechanism available that would let me do so? And, is this the intended design & constraint of
substitute_variable? The doc string reads:From that, I'd guess that anywhere in the query would be a fair target for substitution.