Create new class in Stardog Studio

Hi Stardog team,
Checking the documentation, I got the impression this should suffice to create a new class:
:test_concept a owl:Class .

or, if necessary, with a prefix:

PREFIX owl: <>
:test_concept a owl:Class .

both give me errors in Stardog Studio though:

Failed to run query: QE0PE2: com.complexible.stardog.plan.eval.ExecutionException: Encountered " <PNAME_LN> ":test_concept "" at line 1, column 1.
Was expecting one of:

";" ...
"base" ...
"prefix" ...
"load" ...
"clear" ...
"drop" ...
"add" ...
"move" ...
"copy" ...
"create" ...
"insert" ...
"delete" ...
"with" ...

when using a prefix, it also fails on the line where the definition would start.
What am I doing wrong here?

Thank you!

1 Like

Hi Jasper,

if you want to insert the data to a DB with a SPARQL query, you would need to do

PREFIX owl: <>
:test_concept a owl:Class .

Hope that helps.

Best regards,

1 Like

Hi Lars,
thanks for the fast response!
That works indeed.

Might be good to add the hint to use the INSERT DATA keyword in the tutorial page for the RDF Graph Data Model :slight_smile:


A document on your Stardog Studio screen can be a SPARQL query, an RDF document, or a few other things depending on the selector in the bottom right corner. It was set to SPARQL thus you needed to make it a syntactically well-formed query by adding INSERT DATA. If you changed it to, say, Turtle, you could have just pressed the Add Data button (instead of Run).


1 Like

Hi Pavel,
thanks for elaborating!
That really helps understanding it.
Since I like the feature of saving it as a stored query, I'll stick with SPARQL code here, but good to know what's possible :slight_smile: