# Select \* pystardog bug

**URL:** https://community.stardog.com/t/select-pystardog-bug/2665
**Category:** Bug
**Created:** [August 18, 2020, 7:42pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665 "2020-08-18T19:42:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![arwesterinen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/arwesterinen/32/40_2.png) [@arwesterinen](https://community.stardog.com/u/arwesterinen)
#### Post date: [August 18, 2020, 7:42pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/1 "2020-08-18T19:42:07Z")

</div>

So, here is a very bizarre bug ... I did a "select \* from \<named\_graph=urn:ontology\> where {?s ?p ?o}" and returned sparql-json.

When working through the binding sets, I got ...

```auto
{'p': {'type': 'uri', 'value': 'urn:myontology:label'}, 's': {'type': 'uri', 'value': 'urn:myontology:SpecificClassName'}, 'o': {'type': 'literal', 'value': 'Specific Label for the Class'}}
{'p': {'type': 'uri', 'value': 'urn:myontology:label'}, 's': {'type': 'uri', 'value': 'urn:myontology:SpecificClassName'}, 'o': {'type': 'literal', 'value': 'Specific Label for the Class'}}
{'p': {'type': 'uri', 'value': 'urn:myontology:specificProperty'}, 's': {'type': 'statement', 's': {'type': 'uri', 'value': 'urn:myontology:SpecificClassName'}, 'p': {'type': 'uri', 'value': 'urn:myontology:indicatedBy'}, 'o': {'type': 'uri', 'value': 'urn:myontology:AnotherSpecificClassName'}, 'g': {'type': 'uri', 'value': 'urn:ontology'}}, 'o': {'type': 'literal', 'value': ':startTime'}}

```

Note the repeating binding sets and then getting back a binding set with variables, p, s, s, p, o, g, o. The "g" is indeed the graph name.

I can send the ontology that was queried (but can't post it). The problem does not happen in Stardog Studio (or if it does, I don't see it).

Andrea

---

<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: [August 18, 2020, 8:19pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/2 "2020-08-18T20:19:09Z")

</div>

Hi Andrea,  
That's the edge property.

---

<div class="post-metadata">

### Author: ![arwesterinen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/arwesterinen/32/40_2.png) [@arwesterinen](https://community.stardog.com/u/arwesterinen)
#### Post date: [August 18, 2020, 8:42pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/3 "2020-08-18T20:42:30Z")

</div>

But, it is not defined that way ... in the ontology ... In actual instances, yes, but not this ontology.

Andrea

---

<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: [August 18, 2020, 8:44pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/4 "2020-08-18T20:44:34Z")

</div>

What data have you loaded and what do you expect should be different?

---

<div class="post-metadata">

### Author: ![arwesterinen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/arwesterinen/32/40_2.png) [@arwesterinen](https://community.stardog.com/u/arwesterinen)
#### Post date: [August 18, 2020, 8:45pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/5 "2020-08-18T20:45:07Z")

</div>

I can send the definition to you ... offline.

I would not have expected duplicated s p o ... binding sets or getting back variables other than s p o.

Andrea

---

<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: [August 18, 2020, 8:47pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/6 "2020-08-18T20:47:56Z")

</div>

If you stored data as edge properties, this what it will look like. You will get back the statement with the edge property as a `?s` binding and the edge property and object in the `?p` and `?o` bindings.

---

<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: [August 18, 2020, 8:59pm UTC](https://community.stardog.com/t/select-pystardog-bug/2665/7 "2020-08-18T20:59:54Z")

</div>

Perhaps try changing your query to `?x ?y ?z` to avoid the overlap of binding names with the statement value.
