# Stardog does not support short SPARQL CONSTRUCT?

**URL:** <https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824>\
**Category:** Support\
**Created:** [February 22, 2018, 11:31am UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824 "2018-02-22T11:31:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathib](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mathib/32/345_2.png) [@mathib](https://community.stardog.com/u/mathib)\
**Post date:** [February 22, 2018, 11:31am UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/1 "2018-02-22T11:31:46Z")

</div>

Hi, I noticed that Stardog cannot handle SPARQL CONSTRUCT when using the short syntax:

CONSTRUCT  
WHERE { ?s ?p ?o }

It only works if you fill in the CONSTRUCT, such as:

CONSTRUCT { ?s ?p ?o }  
WHERE { ?s ?p ?o }

It would be nice if Stardog could support this 🙂

---

<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:** [February 22, 2018, 11:38am UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/2 "2018-02-22T11:38:27Z")

</div>

Hi, Stardog supports `construct where { ?s ?p ?o }`. What exactly query doesn’t work?

Best,  
Pavel

---

<div class="post-metadata">

**Author:** ![mathib](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mathib/32/345_2.png) [@mathib](https://community.stardog.com/u/mathib)\
**Post date:** [February 22, 2018, 11:45am UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/3 "2018-02-22T11:45:18Z")

</div>

Hi Pavel, I always get the following error:

> Error!  
> {"message":"can not use shorthand CONSTRUCT: graph pattern in WHERE clause is not a basic pattern.","code":"MalformedQuery"}

It does work when doing copying the part inside the WHERE to the CONSTRUCT

---

<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:** [February 22, 2018, 11:47am UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/4 "2018-02-22T11:47:51Z")

</div>

What version of Stardog is it? How do you run the query?

---

<div class="post-metadata">

**Author:** ![mathib](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mathib/32/345_2.png) [@mathib](https://community.stardog.com/u/mathib)\
**Post date:** [February 22, 2018, 12:08pm UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/5 "2018-02-22T12:08:40Z")

</div>

It’s v5.2.1. and I tried it in the Stardog web viewer, where it fails.

If I use it via another application (thus sending requests to the stardog server) there is no error

---

<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:** [February 22, 2018, 12:17pm UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/6 "2018-02-22T12:17:28Z")

</div>

OK, now I see what happens.

The old Webconsole adds an implicit `LIMIT` to the query and it turns out there’s a bug with parsing `construct where { ?s ?p ?o } limit 10`. We’ll fix it.

Meanwhile you should stop using Webconsole in favor of Stardog Studio (which doesn’t add limits). Webconsole won’t be supported in the future.

Thanks,  
Pavel

---

<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:** [March 8, 2018, 12:17pm UTC](https://community.stardog.com/t/stardog-does-not-support-short-sparql-construct/824/7 "2018-03-08T12:17:29Z")

</div>

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