# Bulk loading named graphs

**URL:** <https://community.stardog.com/t/bulk-loading-named-graphs/806>\
**Category:** Support\
**Created:** [February 8, 2018, 2:09pm UTC](https://community.stardog.com/t/bulk-loading-named-graphs/806 "2018-02-08T14:09:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wouter](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@Wouter](https://community.stardog.com/u/Wouter)\
**Post date:** [February 8, 2018, 2:09pm UTC](https://community.stardog.com/t/bulk-loading-named-graphs/806/1 "2018-02-08T14:09:29Z")

</div>

As far as I can tell, named graphs cannot be created when creating a db. I currently created named graphs using `stardog add -g`. Can this be supported upon db creation, as well, and would result in faster loading?

---

<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:** [February 8, 2018, 2:13pm UTC](https://community.stardog.com/t/bulk-loading-named-graphs/806/2 "2018-02-08T14:13:19Z")

</div>

If you were to use an RDF format that supported named graphs/contexts such as TriG or n-quads, they would be created when loading the files in, even during `db create`.

Stardog does not really support the notion of an “empty graph,” so there is no need to “create” a graph without populating it with data.

---

<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:** [February 8, 2018, 2:18pm UTC](https://community.stardog.com/t/bulk-loading-named-graphs/806/3 "2018-02-08T14:18:03Z")

</div>

Actually, if you were talking about specifying named graphs when loading multiple files at `db create` time, we _are_ looking to add support for this in an upcoming release. In the meantime, you can use the SNARL API in Java to [workaround this limitation a bit](https://gist.github.com/evren/7601614#file-createdbwithnamedgraphs-java)

---

<div class="post-metadata">

**Author:** ![Wouter](https://avatars.discourse-cdn.com/v4/letter/w/e99b99/32.png) [@Wouter](https://community.stardog.com/u/Wouter)\
**Post date:** [February 8, 2018, 2:28pm UTC](https://community.stardog.com/t/bulk-loading-named-graphs/806/4 "2018-02-08T14:28:02Z")

</div>

Thanks @stephen, indeed I was talking about that. Thanks for the workaround, that gist did not show up in my search engine’s results…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [February 22, 2018, 2:28pm UTC](https://community.stardog.com/t/bulk-loading-named-graphs/806/5 "2018-02-22T14:28:20Z")

</div>

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