I am trying to make a federated query in Virtuoso without success. Here are the two sample queries I use (and found online):

SELECT ?s ?p ?o WHERE {
 SERVICE <http://dbpedia.org/sparql>
 { SELECT ?s ?p ?o WHERE { 
     ?s ?p ?o . 
   } LIMIT 10


PREFIX imdb: <http://data.linkedmdb.org/resource/movie/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dbpo: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?birthDate ?spouseName ?movieTitle ?movieDate {
  { SERVICE <http://dbpedia.org/sparql>
    { SELECT ?birthDate ?spouseName WHERE {
        ?actor rdfs:label "Arnold Schwarzenegger"@en ;
               dbpo:birthDate ?birthDate ;
               dbpo:spouse ?spouseURI .
        ?spouseURI rdfs:label ?spouseName .
        FILTER ( lang(?spouseName) = "en" )
  { SERVICE <http://data.linkedmdb.org/sparql>
    { SELECT ?actor ?movieTitle ?movieDate WHERE {
      ?actor imdb:actor_name "Arnold Schwarzenegger".
      ?movie imdb:actor ?actor ;
             dcterms:title ?movieTitle ;
             dcterms:date ?movieDate .

Now when I try them both from a virtuoso server i.e. http://nl.dbpedia.org/sparql (VOS 6.1.6) I get

Virtuoso 37000 Error SP031: SPARQL compiler: http://dbpedia.org/sparql does not support OPTION (...) clause for triples so SPARQL query can not be composed

for the first query and

Virtuoso 37000 Error SP031: SPARQL compiler: http://data.linkedmdb.org/sparql does not support SPARQL-BI extensions (like nested SELECT) so SPARQL query can not be composed

for the second while they both run fine in http://libris.kb.se/sparql

asked 11 Nov '12, 15:11

jimkont's gravatar image

accept rate: 50%

This is a known issue resolved in the latest Virtuoso archive. As you are using Virtuoso open source you can get these latest updates from our github develop/6 branch and recompile a new binary to test as detailed at:


Please let me know if this resolves the problem for you ?

permanent link

answered 11 Nov '12, 20:58

HughWilliams's gravatar image

accept rate: 33%


Hi Hugh, I will need to deploy this to a live server (http://nl.dbpedia.org/sparql), is the developer branch "safe" or should I wait for the next VOS release?

(12 Nov '12, 02:23) jimkont jimkont's gravatar image


I think that the Virtuoso link that you provide is the version 06.01.3127 and does not support the SERVICE clause. Based on their wiki Virtuoso, SERVICE is supported from version 6.1.6.

Apart from that, just a small remark for the first query. If you are taking the results for all variables inside the SERVICE clause then the inner SELECT is not required because SERVICE comes up from default with a SELECT * WHERE { }. So better would be:

SELECT ?s ?p ?o WHERE { SERVICE http://dbpedia.org/sparql { ?s ?p ?o . } LIMIT 10 }

kind regards, Christos

permanent link

answered 11 Nov '12, 16:15

Christos's gravatar image

accept rate: 33%

Thank you Christos but the version you state is not the VOS release, it should be a plugin vesrion (or something)

(12 Nov '12, 02:27) jimkont jimkont's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Nov '12, 15:11

question was seen: 2,026 times

last updated: 12 Nov '12, 02:27