Hi @imikhailov
Thank you for your reply
I have tried to:
- comment the
?otherdataset
in the SERVICE
part and it returned only results from local datasets
- run the query on VOS 7.20.3229 instance and the error message was the same.
- run the query on VOS 7.20.3229 and generate SPARQL compilation report. This was the report :
SPARQL query after parsing, optimization, and converting back into SPARQL
SELECT DISTINCT ?school_name
?lat
?long
?region_name
?otherdataset
?abs
FROM <http://civiclab.or.tz/togd/dataset/school#>
WHERE { ?l <http://vocab.opendatadom.or.tz/prop/prop.owl#school_name> ?school_name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?lat ;
<http://www.w3.org/2003/01/geo/wgs84_pos#long> ?long ;
<http://schema.org/Place> ?region . ?region <http://vocab.opendatadom.or.tz/prop/prop.owl#region_name> ?region_name ;
<http://www.w3.org/2002/07/owl#sameAs> ?otherdataset .
OPTIONAL {
SERVICE <http://DBpedia.org/sparql> ( IN ?otherdataset) {
{ SELECT ?abs
?otherdataset
FROM <http://civiclab.or.tz/togd/dataset/school#>
WHERE { ?otherdataset <http://dbpedia.org/ontology/abstract> ?abs . } } } } }
SPARQL query translated to SQL
For security reasons, code responsible for graph-level security is not generated and some account-specific data are intentionally made wrong. ERROR 37000: SP031: SPARQL compiler: Internal error: ssg_print_equiv_retval_expn(): union selid is out of scope
SQL execution plan
ERROR 37000: SQ074: Line 32: SP031: SPARQL compiler: Internal error: ssg_print_equiv_retval_expn(): union selid is out of scope
Internal optimizer data
These data are primarily for OpenLink support, to get additional details about the query processing.
QUERY: (line 32) REQUEST TOP NODE (SELECT DISTINCT result-mode):
RETVALS: ARRAY OF NODES with 6 children: {
(line 10) VARIABLE: notNULL exported
NAME: UNAME `school_name' SELECT ID: STRING `s_32_11' TABLE ID: LONG 0 EQUIV: LONG 11
(line 11) VARIABLE: notNULL exported
NAME: UNAME `lat' SELECT ID: STRING `s_32_11' TABLE ID: LONG 0 EQUIV: LONG 12
(line 11) VARIABLE: notNULL exported
NAME: UNAME `long' SELECT ID: STRING `s_32_11' TABLE ID: LONG 0 EQUIV: LONG 13
(line 11) VARIABLE: notNULL exported
NAME: UNAME `region_name' SELECT ID: STRING `s_32_11' TABLE ID: LONG 0 EQUIV: LONG 14
(line 11) VARIABLE: notNULL exported
NAME: UNAME `otherdataset' SELECT ID: STRING `s_32_11' TABLE ID: LONG 0 EQUIV: LONG 15
(line 11) VARIABLE: exported
NAME: UNAME `abs' SELECT ID: STRING `s_32_11' TABLE ID: LONG 0 EQUIV: LONG 16
}
RETVALS SELECT ID: STRING `s_32_11'
SOURCES: ARRAY OF NODES with 1 children: {
(line 14) DATA SOURCE: FROM (default)
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
EXPN: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
}
PATTERN: (line 32) GRAPH PATTERN:WHERE gp
MEMBERS: ARRAY OF NODES with 7 children: {
(line 15) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 15) VARIABLE: notNULL+ reference+ (subject)
NAME: UNAME `l' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t7' EQUIV: LONG 21
PREDICATE: (line 15) QNAME:
IRI: UNAME `http://vocab.opendatadom.or.tz/prop/prop.owl#school_name'
OBJECT: (line 15) VARIABLE: notNULL+ (object)
NAME: UNAME `school_name' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t7' EQUIV: LONG 11
SELECT ID: STRING `s_32_11'
TABLE ID: STRING `s_32_12_t7'
(line 16) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 16) VARIABLE: notNULL+ reference+ (subject)
NAME: UNAME `l' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t8' EQUIV: LONG 21
PREDICATE: (line 16) QNAME:
IRI: UNAME `http://www.w3.org/2003/01/geo/wgs84_pos#lat'
OBJECT: (line 16) VARIABLE: notNULL+ (object)
NAME: UNAME `lat' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t8' EQUIV: LONG 12
SELECT ID: STRING `s_32_11'
TABLE ID: STRING `s_32_12_t8'
(line 17) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 17) VARIABLE: notNULL+ reference+ (subject)
NAME: UNAME `l' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t9' EQUIV: LONG 21
PREDICATE: (line 17) QNAME:
IRI: UNAME `http://www.w3.org/2003/01/geo/wgs84_pos#long'
OBJECT: (line 17) VARIABLE: notNULL+ (object)
NAME: UNAME `long' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t9' EQUIV: LONG 13
SELECT ID: STRING `s_32_11'
TABLE ID: STRING `s_32_12_t9'
(line 18) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 18) VARIABLE: notNULL+ reference+ (subject)
NAME: UNAME `l' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t10' EQUIV: LONG 21
PREDICATE: (line 18) QNAME:
IRI: UNAME `http://schema.org/Place'
OBJECT: (line 18) VARIABLE: notNULL+ reference (object)
NAME: UNAME `region' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t10' EQUIV: LONG 22
SELECT ID: STRING `s_32_11'
TABLE ID: STRING `s_32_12_t10'
(line 19) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 19) VARIABLE: notNULL+ reference+ (subject)
NAME: UNAME `region' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t11' EQUIV: LONG 22
PREDICATE: (line 19) QNAME:
IRI: UNAME `http://vocab.opendatadom.or.tz/prop/prop.owl#region_name'
OBJECT: (line 19) VARIABLE: notNULL+ (object)
NAME: UNAME `region_name' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t11' EQUIV: LONG 14
SELECT ID: STRING `s_32_11'
TABLE ID: STRING `s_32_12_t11'
(line 20) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 20) VARIABLE: notNULL+ reference+ (subject)
NAME: UNAME `region' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t12' EQUIV: LONG 22
PREDICATE: (line 20) QNAME:
IRI: UNAME `http://www.w3.org/2002/07/owl#sameAs'
OBJECT: (line 20) VARIABLE: notNULL+ (object)
NAME: UNAME `otherdataset' SELECT ID: STRING `s_32_11' TABLE ID: STRING `s_32_12_t12' EQUIV: LONG 15
SELECT ID: STRING `s_32_11'
TABLE ID: STRING `s_32_12_t12'
(line 31) GRAPH PATTERN:OPTIONAL gp
MEMBERS: ARRAY OF NODES with 1 children: {
(line 30) GRAPH PATTERN:SERVICE gp
MEMBERS: ARRAY OF NODES with 1 children: {
(line 30) GRAPH PATTERN:SELECT result-mode
MEMBERS: EMPTY ARRAY
SUBQUERY: (line 30) REQUEST TOP NODE (SELECT result-mode):
VALMODE FOR RETVALS: STRING `AUTO'
RDF DATA STORAGE: UNAME `http://www.openlinksw.com/schemas/virtrdf#DefaultServiceStorage'
RETVALS: ARRAY OF NODES with 2 children: {
(line 0) ALIAS:
ALIAS NAME: UNAME `abs'
VALUE: (line 25) VARIABLE: notNULL exported
NAME: UNAME `abs' SELECT ID: STRING `s_30_7' TABLE ID: LONG 0 EQUIV: LONG 8
(line 0) ALIAS:
ALIAS NAME: UNAME `otherdataset'
VALUE: (line 25) VARIABLE: notNULL reference exported
NAME: UNAME `otherdataset' SELECT ID: STRING `s_30_7' TABLE ID: LONG 0 EQUIV: LONG 7
}
RETVALS SELECT ID: STRING `s_30_7'
SOURCES: ARRAY OF NODES with 1 children: {
(line 14) DATA SOURCE: FROM (default)
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
EXPN: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
}
PATTERN: (line 30) GRAPH PATTERN:WHERE gp
MEMBERS: ARRAY OF NODES with 1 children: {
(line 27) TRIPLE:
GRAPH: (line 13) QNAME:
IRI: UNAME `http://civiclab.or.tz/togd/dataset/school#'
SUBJECT: (line 27) VARIABLE: notNULL+ reference+ exported (subject)
NAME: UNAME `otherdataset' SELECT ID: STRING `s_30_7' TABLE ID: STRING `s_30_7_t0' EQUIV: LONG 7
PREDICATE: (line 27) QNAME:
IRI: UNAME `http://dbpedia.org/ontology/abstract'
OBJECT: (line 27) VARIABLE: notNULL+ exported (object)
NAME: UNAME `abs' SELECT ID: STRING `s_30_7' TABLE ID: STRING `s_30_7_t0' EQUIV: LONG 8
SELECT ID: STRING `s_30_7'
TABLE ID: STRING `s_30_7_t0'
}
FILTERS: EMPTY ARRAY
SELECT ID: STRING `s_30_7'
EQUIVS: 7 8
FILTERS: EMPTY ARRAY
SELECT ID: STRING `s_30_8'
EQUIVS: 9 10
}
FILTERS: EMPTY ARRAY
SELECT ID: STRING `s_30_9'
OPTIONS: ARRAY OF NODES with 2 children: {
LONG 1020
(line 24) SERVICE INV:
ENDPOINT: (line 23) QNAME:
IRI: UNAME `http://DBpedia.org/sparql'
IRI PARAMS: EMPTY ARRAY
SYNTAX: LONG -2147483520
PARAM VARNAMES: ARRAY OF NODES with 1 children: {
UNAME `otherdataset'
}
RSET VARNAMES: ARRAY OF NODES with 1 children: {
UNAME `abs'
}
DEFINES: EMPTY ARRAY
}
EQUIVS: 17 19
}
FILTERS: EMPTY ARRAY
SELECT ID: STRING `s_31_10'
EQUIVS: 18 20
}
FILTERS: EMPTY ARRAY
SELECT ID: STRING `s_32_11'
EQUIVS: 11 12 13 14 15 16 21 22
EQUIVS:
#0: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: l in; notNULL reference)
#1: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: school_name in; notNULL)
#2: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: lat in; notNULL)
#3: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: long in; notNULL)
#4: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: region in; notNULL reference)
#5: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: region_name in; notNULL)
#6: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 0 gspo, 0 const, 0 opt, 0 subq: otherdataset in; notNULL)
#7: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: otherdataset in s_30_7_t0 s_30_7; notNULL reference exported)
#8: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: abs in s_30_7_t0 s_30_7; notNULL exported)
#9: ( 0 subv (0 bindings, 0 nest.opt.), 1 recv, 0 gspo, 0 const, 0 opt, 1 subq: abs in; notNULL exported)
#10: ( 0 subv (0 bindings, 0 nest.opt.), 1 recv, 0 gspo, 0 const, 0 opt, 1 subq: otherdataset in; notNULL reference exported)
#11: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: school_name in s_32_11 s_32_12_t7; notNULL exported)
#12: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: lat in s_32_11 s_32_12_t8; notNULL exported)
#13: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: long in s_32_11 s_32_12_t9; notNULL exported)
#14: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: region_name in s_32_11 s_32_12_t11; notNULL exported)
#15: ( 1 subv (1 bindings, 1 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: otherdataset in s_32_11 s_32_12_t12; notNULL exported)
#16: ( 1 subv (1 bindings, 1 nest.opt.), 0 recv, 0 gspo, 1 const, 0 opt, 0 subq: abs in s_32_11; exported)
#17: ( 1 subv (1 bindings, 0 nest.opt.), 1 recv, 0 gspo, 0 const, 0 opt, 0 subq: abs in; notNULL exported)
#18: ( 1 subv (1 bindings, 0 nest.opt.), 1 recv, 0 gspo, 0 const, 0 opt, 0 subq: abs in; notNULL exported)
#19: ( 1 subv (1 bindings, 0 nest.opt.), 1 recv, 0 gspo, 0 const, 0 opt, 0 subq: otherdataset in; notNULL reference exported)
#20: ( 1 subv (1 bindings, 0 nest.opt.), 1 recv, 0 gspo, 0 const, 0 opt, 0 subq: otherdataset in; notNULL reference exported)
#21: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 4 gspo, 0 const, 0 opt, 0 subq: l in s_32_12_t10 s_32_12_t9 s_32_12_t8 s_32_12_t7;)
#22: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 3 gspo, 0 const, 0 opt, 0 subq: region in s_32_12_t12 s_32_12_t11 s_32_12_t10;)