Can't insert through SPARQL

Hi,

I have a really simple ontology named "insert" at http://www.test.owl

  • one concept: "A"
  • one individual in it: "a"

When I query with CLI, no problem:

./stardog query -r insert "prefix insert: <http://www.test.owl#> select ?s where {?s a :A}"
+-------+
|   s   |
+-------+
| :a    |
+-------+

Then I insert another individual:

./stardog query insert "prefix insert: <http://www.test.owl#>; insert data {graph <http://www.test.owl>{:b a :A}}"
1 triple added in 00:00:00.052

But the select could not find it:

./stardog query -r insert "prefix insert: <http://www.test.owl#> select ?s where {?s a :A}"
+-------+
|   s   |
+-------+
| :a    |
+-------+

But if I browse the ontology through the web interface, "b" is really in "A".

Did I miss something ?

Thank you,
FR.

Your insert statement adds the triple into a named graph whereas you’re querying the default graph.

Try ./stardog query insert "prefix insert: <http://www.test.owl#> insert data { :b a :A }"

Cheers,
Pavel

Great ! Thank you, Pavel.

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