Hi,
sorry, I meant the original query *but without variables *(instead of 
variables ?dataset and ?sparqlEndpoint I put concrete url-s). This works in 
SPARQL view, but I thought it did not work in sml:ApplyConstruct. But it 
works ! :(, I have just checked it.

sorry for the confusion and thank you !,
Peter  



On Monday, May 2, 2016 at 3:32:09 AM UTC+2, Holger Knublauch wrote:
>
> When you say the original query works in the SPARQL view, how could that 
> query work in the syntax that you wrote it - it neither would know 
> ?sparqlEndpoint nor ?dataset. As the SPARQL view doesn't have a concept of 
> pre-bound variables (apart from ?this), it would go through different code 
> than the ApplyConstruct case that is embedded into a SPARQLMotion script 
> and previous steps would bind variable values.
>
> Holger
>
>
> On 2/05/2016 4:27, [email protected] <javascript:> wrote:
>
> Hi Holger,
> thank You very much, the workaround worked for me. Just wanted to mention 
> that the original query works in SPARQL view, so it was strange for me that 
> it did not work in the sml:ApplyConstruct  module (maybe there are some 
> limitation that i am not aware of).  
>
> Best regards,
> Peter 
>
> On Wednesday, April 27, 2016 at 8:50:16 AM UTC+2, Holger Knublauch wrote: 
>>
>> This work-around may help:
>>
>> SELECT ?s ?p ?o
>> WHERE {
>>     {
>>         BIND (IRI(CONCAT(str(?sparqlEndpoint), "?default-graph-uri=", 
>> encode_for_uri(str(?dataset)))) AS ?url) .
>>     }
>>     SERVICE ?url {
>>         ?s ?p ?o
>>     }
>> }
>>
>> The trick here is to avoid passing the default query graph into the 
>> query, and instead put it into the URL using the SPARQL 1.1 protocol. Note 
>> that this approach may not help if you have other pre-bound variables to 
>> pass into the SERVICE request.
>>
>> Holger
>>
>>
>> On 27/04/2016 16:38, [email protected] wrote:
>>
>> Hi,
>>
>>
>> I am trying to query sparql endpoint with sparql motion module of type 
>> sml:ApplyConstruct, where sml:ApplyConstruct is set to:
>>
>>
>> CONSTRUCT {
>>
>>     ?s ?p ?o .
>>
>> }
>>
>> WHERE {
>>
>>     SERVICE ?sparqlEndpoint {
>>
>>         GRAPH ?dataset {
>>
>>             ?s ?p ?o .
>>
>>         } .
>>
>>     } .
>>
>> }
>>
>>
>> ?sparqlEndpoint and ?dataset are pointing to correct urls. Unfortunately 
>> when i run script i get exception : 
>>
>>    - 
>>    
>>    Operation failed. On: Apr 22, 2016 5:52:53 PM Reason: 
>>    java.lang.UnsupportedOperationException: Initial bindings not supported 
>> for 
>>    remote queries, consider using a ParameterizedSparqlString to prepare a 
>>    query for remote execution at 
>>    
>> com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.setInitialBinding(QueryEngineHTTP.java:236)at
>>  
>>    
>> org.topbraid.sparql.LockOptimizedQueryExecution.setInitialBinding(LockOptimizedQueryExecution.java:94)
>>  
>>    at 
>>    
>> org.topbraid.spin.sparqlmotion.modules.SMModuleUtil.applyVarBindings(SMModuleUtil.java:92)at
>>  
>>    
>> org.topbraid.spin.sparqlmotion.modules.SMModuleUtil.createQueryExecution(SMModuleUtil.java:192)
>>  
>>    at 
>>    
>> org.topbraid.spin.sparqlmotion.lib.internal.ApplyConstructModule.applyConstruct(ApplyConstructModule.java:51)at
>>  
>>    
>> org.topbraid.spin.sparqlmotion.lib.internal.ApplyConstructModule.createGraph(ApplyConstructModule.java:41)
>>  
>>    at 
>>    
>> org.topbraid.spin.sparqlmotion.modules.AbstractSMModule.getRDFOutput(AbstractSMModule.java:907)at
>>  
>>    
>> org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:176)
>>  
>>    at 
>>    
>> org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)at
>>  
>>    
>> org.topbraidcomposer.sparqlmotion.views.console.SPARQLMotionConsole.execute(SPARQLMotionConsole.java:79)
>>  
>>    at 
>>    
>> org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:142)at
>>  
>>    org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64) at 
>>    java.lang.Thread.run(Thread.java:745) 
>>    
>>
>> Am I doing something wrong ? Or is there any other module that i can use 
>> to query concrete dataset of sparql endpoint ?
>>
>> Thanks,
>> Peter G.
>> -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
>> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
>> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>> To post to this group, send email to [email protected]
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "TopBraid Suite Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to [email protected] 
> <javascript:>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to