Hi,
I am trying to run the following query for combining data from Stardog with data from another SPARQL Endpoint:
Prefix ex: <https://example.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE {
?subj ex:category "StatusCat";
rdfs:label ?status.
SERVICE <http://endpoint1:3030/sparql> {
?uri rdfs:label ?status.
}
}}
Basically, this SPARQL Endpoint is built on top of a normal JSON Web API where conversion of the JSON response to RDF triples is done on the fly. So, this service accepts as a parameter the variable ?status, therefore the query should be executed in an iterative way, i.e. for each value of the ?status variable there should be initiated a call to <http://endpoint1:3030/sparql>
.
When I run directly:
Prefix ex: <https://example.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE {
SERVICE <http://endpoint1:3030/sparql> {
?uri rdfs:label "status1".
}
}
it works as expected, but this is only for one value.
I also tried without success the following ways:
Prefix ex: <https://example.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE {
SERVICE <http://endpoint1:3030/sparql> {
?uri rdfs:label ?status.
{
select ?status where{
?subj ex:category "StatusCat";
rdfs:label ?status.
}
}
}
}
and
Prefix ex: <https://example.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE {
?subj ex:category "StatusCat".
SERVICE <http://endpoint1:3030/sparql> {
?uri rdfs:label ?status.
{
?subj rdfs:label ?status.
}
}
}
The issue seems to be the same or similar to the one posted here: https://community.stardog.com/t/federated-query-with-inline-data-returns-empty-result/487/2
Maybe I am doing something wrong.
Best,
Lav