Reasoning over virtual graph

Hi Stardog team,

I’m trying to get a quick test whether “owl:equivalentProperty” and “owl:sameAs” reasoning works over the virtual graph.

  1. EquivalentProperty
    I have two simple RDB tables, table_a and table_b.
    I defined those tables in a test.ttl file and could connect each table via query using virtual graph.
    Table_a has a column named with “id” and Table_b has a column named with “idx”.
select *
{
  GRAPH virtual://test {
      ?s ta:id ?o .
   }
}

–> OK

select *
{
  GRAPH virtual://test {
      ?s tb:idx ?o .
   }
}

–> OK

Then, I inserted the following triple into an arbitrary stardog database.

insert {
tb:idx owl:equivalentProperty ta:id
}
where {}

After turning the reasoning option, I ran the following query again.

select *
{
  GRAPH <virtual://test> {
      ?s ta:id ?o .
   }
}

What I expected from this query was getting all pairs of ?s and ?o from table_a and table_b.
However, this query results in internal server error.

Am I doing something wrong here?

  1. owl:sameAs

table_a has “id” field and the values in that field were defined as instances.
One of the instances is ta:abc.

table_b has “idx” field and the values in that field were defined as instances.
One of the instances is tb:def.

select *
{
  GRAPH virtual://test {
      ?s ta:id ?o .
      filter(?o = ta:abc)
   }
}

–> OK

select *
{
  GRAPH virtual://test {
      ?s tb:idx ?o .
      filter(?o = tb:def)
   }
}

–> OK

Then, I inserted the following triple into the stardog database.

insert {
    ta:abc owl:sameAs tb:def
}
where {}

I tried the following query but I don’t get an expected result. (of course reasoning = ON)
What I expected was to get the ?s having abc as an ID.

select *
{
  GRAPH virtual://test {
      ?s ta:id ?o .
      filter(?o = tb:def)
   }
}

For 1) and 2), I’d like to know whether these kind of reasoning is supposed to work in the Stardog 5.2.3.
Could you please give some advise if I’m doing something wrong?

Thank you so much.

Hi, and welcome.

For (1), the equivalentProperty error, can you please check the contents of stardog.log in your STARDOG_HOME directory? These types of internal errors will have additional details contained in the log file. This will help us to troubleshoot the issue.

Jess

For (2), the query with filter(?o = tb:def), can you run stardog query explain to generate the query plan and share it here?

Jess

I have a full error log but I meet 403 forbidden error when I try to put long log at once.

I had some difficulty in posting the reply with some links (though the links were just IRIs).
So instead I sent the entire logs for (1) and query plan for (2) via email to support.

Thank you.

Thanks. We will take a look and reply there.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.