# What is the turtle file syntax for named graph?

**URL:** <https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452>\
**Category:** Stardog Studio\
**Created:** [January 25, 2019, 6:25pm UTC](https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452 "2019-01-25T18:25:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kazi](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/kazi/32/348_2.png) [@kazi](https://community.stardog.com/u/kazi)\
**Post date:** [January 25, 2019, 6:25pm UTC](https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452/1 "2019-01-25T18:25:57Z")

</div>

I am trying to load ttl file with named graph. Tried with some intuitive changes but nothing worked. Stardog-studio fails to load data. For example this below-

```auto
@graph <https://pet.dudeson.org/vat/xxxx-0001-zzzz> {
  <https://pet.dudeson.org/image/xxxx-0001-zzzz> rdf:type tcf:ObjectUpdate ;
    tcf:ObjectRef <https://pet.dudeson.org/png-00> .
}

```

Also tried with removing "@graph", but no good. Does anyone know what is the syntax for named graph in turtle file for stardog?

---

<div class="post-metadata">

**Author:** ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)\
**Post date:** [January 25, 2019, 6:28pm UTC](https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452/2 "2019-01-25T18:28:02Z")

</div>

You will need to use the TriG syntax, check here: [RDF 1.1 TriG](https://www.w3.org/TR/trig/#sec-graph-statements)

---

<div class="post-metadata">

**Author:** ![kazi](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/kazi/32/348_2.png) [@kazi](https://community.stardog.com/u/kazi)\
**Post date:** [January 25, 2019, 6:31pm UTC](https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452/3 "2019-01-25T18:31:55Z")

</div>

Already tried, did not work.

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [January 25, 2019, 7:25pm UTC](https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452/4 "2019-01-25T19:25:54Z")

</div>

Until full TriG support comes to Studio, you can insert data into a named graph by formatting as a SPARQL Update query and simply running it in Studio:

```auto
INSERT DATA {
    GRAPH <https://pet.dudeson.org/vat/xxxx-0001-zzzz> {
    <https://pet.dudeson.org/image/xxxx-0001-zzzz> rdf:type tcf:ObjectUpdate ;
        tcf:ObjectRef <https://pet.dudeson.org/png-00> .
    }
}

```

---

<div class="post-metadata">

**Author:** ![danielbakas](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/danielbakas/32/2180_2.png) [@danielbakas](https://community.stardog.com/u/danielbakas)\
**Post date:** [October 30, 2024, 10:10pm UTC](https://community.stardog.com/t/what-is-the-turtle-file-syntax-for-named-graph/1452/5 "2024-10-30T22:10:47Z")

</div>

Hi @stephen!

Has TriG arrived to Studio yet?

How can we use the text editor to work with our named graphs?

Thanks!
