# No named graphs returned with reasoning explain --print-named-graphs

**URL:** <https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224>\
**Category:** Support\
**Created:** [April 10, 2017, 6:13pm UTC](https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224 "2017-04-10T18:13:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertbhacker](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/robertbhacker/32/68_2.png) [@robertbhacker](https://community.stardog.com/u/robertbhacker)\
**Post date:** [April 10, 2017, 6:13pm UTC](https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224/1 "2017-04-10T18:13:23Z")

</div>

Hi Community,

I have been using reasoning explanation feature a lot in my development.  
However, I have found that the command stardog reasoning explain --print-named-graphs doesn't return named graphs even though there is named graphs associated.

For example, I use LUBM dataset, execute the command and get the result:

 ![](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/a5b62c7a32f196fd50e4facc476cd91f67f9cf16.png)  
In my database, triple :FullProfessor1 :owl#headOf Department7.University0.edu is in graph id [http://example.org/graph11](http://example.org/graph11), but it is never returned by this command. I have tried this in stardog 4.2.4, 4.2.2, 4.1.3, and 4.0-RC2, none of these works.  
I am wondering what I should do to fix this problem?

Thanks!  
Robert

---

<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:** [April 10, 2017, 6:18pm UTC](https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224/2 "2017-04-10T18:18:37Z")

</div>

Hi Robert,

It appears that you’re keeping the default output format of Turtle, which doesn’t support named graphs. Try adding a parameter with the `--output-format` option set to Trig, Nquads, etc. that support displaying named graphs

Edit: The default output format is actually TEXT, but I’m willing to bet that it’s based on Turtle, since that’s the default most places it can be.

---

<div class="post-metadata">

**Author:** ![robertbhacker](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/robertbhacker/32/68_2.png) [@robertbhacker](https://community.stardog.com/u/robertbhacker)\
**Post date:** [April 10, 2017, 6:37pm UTC](https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224/3 "2017-04-10T18:37:25Z")

</div>

Thank you Stephen,

I have used --output-format option, but no graph names returned...

 ![](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/946c88736dce4d085b1fea521d3be1d3a0951f26.png)  
I also checked if the named graph is still in the database, and it turns out to be there.

I also tried to use Java APi to retrieve all named graphs: Proof.getNamedGraphs() will also never return any...

---

<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:** [April 11, 2017, 3:34pm UTC](https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224/4 "2017-04-11T15:34:02Z")

</div>

Hi Robert,

Could you send/attach the dataset you’re using? I am unable to reproduce this problem with both a fake dataset I created and a LUBM dataset that I found.

If it’s too large, could you at least send an export of the triples/quads needed to make this assertion?

---

<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:** [April 25, 2017, 3:36pm UTC](https://community.stardog.com/t/no-named-graphs-returned-with-reasoning-explain-print-named-graphs/224/5 "2017-04-25T15:36:20Z")

</div>

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