s5uybw
(vivian wang)
December 3, 2019, 6:38pm
1
Hi, I got exception error thrown out as
QueryEval: Logical service query cannot be evaluated
when I am trying to query from virtual graph and join with another sparql endpoint using service.
Is this type of query not supported by Stardog?
Query:
SELECT ?child ?name ?lei ?country ?city ?street ?type ?ultiparent
{
graph <virtual://db1> {
?ultiparent ^relationship:UltimateParent ?child;
party:hasName "Everest Re Group, Ltd." .
?child party:hasName ?name .
?child ^relationship:hasChild ?Relation.
?Relation relationship:hasParent ?directparent.
?directparent party:hasName ?directparentname .
?Relation a ?type.
optional {
{
?child owl:sameAs ?lei.
{
SERVICE <https://lei.info/sparql> {
GRAPH ?g {
?lei voc-l1:legalName ?legalName .
?lei voc-l1:legalAddress ?legalAddress .
?legalAddress voc-l1:country ?country .
?legalAddress voc-l1:city ?city .
?legalAddress voc-l1:streetAddress ?street .
?legalAddress voc-l1:postalCode ?postalCode .
}
}
}
}
}
}
}
jess
(Jess Balint)
December 6, 2019, 6:18pm
2
Hi Vivian,
Stardog does not support a SERVICE
block inside a virtual graph block. Is the owl:sameAs
coming from the virtual graph? You will have to move that pattern to a separate block to join in an OPTIONAL, eg:
graph <virtual://...> {
?child ..
}
OPTIONAL {
graph <virtual://...> {
?child owl:sameAs ?lei
}
service <...> {
?lei ...
}
}
Jess
s5uybw
(vivian wang)
December 7, 2019, 2:23am
3
Jess, thanks. I put the service to a separate block, this time no error, but no return result. I did a quick test trying to isolate the problem.
Create a db using studio with all default setting.
Insert 1 triple for lei id.
@prefix lei-info: <http://lei.info/> .
@prefix party: <http://example.com/data/> .
party:12345 owl:sameAs lei-info:549300N24XF2VV0B3570 .
Run following query, return the result
prefix lei-info: <http://lei.info/>
PREFIX voc-l1: <http://lei.info/voc/l1/>
PREFIX voc-l2: <http://lei.info/voc/l2/>
prefix party: <http://example.com/data/>
SELECT ?party ?lei ?country ?city ?street
{
party:12345 owl:sameAs ?lei.
{ SERVICE <https://lei.info/sparql> {
GRAPH ?g {
?lei voc-l1:legalName ?legalName .
?lei voc-l1:legalAddress ?legalAddress .
?legalAddress voc-l1:country ?country .
?legalAddress voc-l1:city ?city .
?legalAddress voc-l1:streetAddress ?street .
?legalAddress voc-l1:postalCode ?postalCode .
}
}
}
}
Run the same query #3 again. The query hung and return with error: 000012: org.apache.http.client.ClientProtocolException
Do you see this kind of issues? what could cause? It can be duplicated.
system
(system)
Closed
December 21, 2019, 2:23am
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.