# Create new class in Stardog Studio

**URL:** <https://community.stardog.com/t/create-new-class-in-stardog-studio/4003>\
**Category:** Support\
**Created:** [October 17, 2022, 12:08pm UTC](https://community.stardog.com/t/create-new-class-in-stardog-studio/4003 "2022-10-17T12:08:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasBo](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JasBo](https://community.stardog.com/u/JasBo)\
**Post date:** [October 17, 2022, 12:08pm UTC](https://community.stardog.com/t/create-new-class-in-stardog-studio/4003/1 "2022-10-17T12:08:47Z")

</div>

Hi Stardog team,  
Checking the [documentation](https://docs.stardog.com/tutorials/rdf-graph-data-model#classes), I got the impression this should suffice to create a new class:  
`:test_concept a owl:Class .`

or, if necessary, with a prefix:

```auto
PREFIX owl: <http://www.w3.org/2002/07/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!

---

<div class="post-metadata">

**Author:** ![Lars\_Heling](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/lars_heling/32/1657_2.png) [@Lars\_Heling](https://community.stardog.com/u/Lars_Heling)\
**Post date:** [October 17, 2022, 12:16pm UTC](https://community.stardog.com/t/create-new-class-in-stardog-studio/4003/2 "2022-10-17T12:16:33Z")

</div>

Hi Jasper,

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

```auto
PREFIX owl: <http://www.w3.org/2002/07/owl#>
INSERT DATA {
:test_concept a owl:Class .
}

```

Hope that helps.

Best regards,  
Lars

---

<div class="post-metadata">

**Author:** ![JasBo](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JasBo](https://community.stardog.com/u/JasBo)\
**Post date:** [October 17, 2022, 12:51pm UTC](https://community.stardog.com/t/create-new-class-in-stardog-studio/4003/3 "2022-10-17T12:51:51Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pavel/32/18_2.png) [@pavel](https://community.stardog.com/u/pavel)\
**Post date:** [October 18, 2022, 8:18am UTC](https://community.stardog.com/t/create-new-class-in-stardog-studio/4003/4 "2022-10-18T08:18:34Z")

</div>

Jasper,

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).

Best,  
Pavel

---

<div class="post-metadata">

**Author:** ![JasBo](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JasBo](https://community.stardog.com/u/JasBo)\
**Post date:** [October 18, 2022, 8:39am UTC](https://community.stardog.com/t/create-new-class-in-stardog-studio/4003/5 "2022-10-18T08:39:54Z")

</div>

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 🙂
