Stardog does not support short SPARQL CONSTRUCT?

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 :slight_smile:

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

Best,
Pavel

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

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

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

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