Hello,
I am trying to test out some the reasoning functionality with Stardog. I have set up some virtual graphs that I have used to test some SPARQL queries already. I have now added a schema called "test_rules" that defines a property to be transitive using rules, as follows:
@prefix : <http://api.stardog.com/> .
@prefix famo: <http://ontology.eil.utoronto.ca/FAMO/famo/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix stardog: <tag:stardog:api:> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
:transitive_subroleof a <tag:stardog:api:rule:SPARQLRule> ;
<tag:stardog:api:rule:content> """IF {
?x <http://ontology.eil.utoronto.ca/FAMO/famo/subRoleOf> ?y .
?y <http://ontology.eil.utoronto.ca/FAMO/famo/subRoleOf> ?z
}
THEN {
?x <http://ontology.eil.utoronto.ca/FAMO/famo/subRoleOf> ?z .
}
""" .
When I run the query without reasoning, it successfully returns some results, however when I run the query with reasoning on the test_rules schema, I get the following error message:
"com.complexible.stardog.plan.eval.operator.OperatorException: Uncaught error during query evaluation: InvalidTermReplacement: Cannot transform a service node: SERVICE virtual://aiw in=[] out=[] {
VirtualGraphSql<virtual://aiw> [#1] {
RelNode=
LogicalProject(aiw_role_id=[$0], project_phase_uuid=[$1], parent_role_id_verified=[$11])
LogicalJoin(condition=[AND(=($1, $12), $2, IS NOT NULL($11))], joinType=[inner])
JdbcTableScan(table=[[public, aiw_real_role_record_tbl]])
JdbcTableScan(table=[[public, aiw_capital_phase_tbl]])
Query=
SELECT "aiw_real_role_record_tbl"."aiw_role_id", "aiw_real_role_record_tbl"."project_phase_uuid", "aiw_real_role_record_tbl"."parent_role_id_verified"
FROM "public"."aiw_real_role_record_tbl"
INNER JOIN "public"."aiw_capital_phase_tbl" ON "aiw_real_role_record_tbl"."project_phase_uuid" = "aiw_capital_phase_tbl"."phase_uuid" AND "aiw_real_role_record_tbl"."new_role" AND "aiw_real_role_record_tbl"."parent_role_id_verified" IS NOT NULL
Vars=
?x2 <- TEMPLATE(_:{project_phase_uuid/1}_{aiw_role_id/0})
?x3 <- TEMPLATE(_:{project_phase_uuid/1}_{parent_role_id_verified/2}_role3)
}
}"
Any insight into the error message and what is going wrong?
Thanks!
Megan