In the Linked Data world, how can i chain together two SPARQL queries to different SPARQL endpoints, such that the second one uses results from the first one as part of the query.

For example, @pezholio's example at suggests it might be possible to run a SPARQL query on the Ordnance Survey endpoint to return a district ward that a particular postcode is in, and a separate query on the National Statistics endpoint to find the Parliamentary constituency that the ward is in. That is, you can go from postcode to ward via OS, and ward to constituency via NS; but i want a single query to go from postcode to constituency via OS and NS...

Is it possible to write a single sparql query that somehow combines these two things and asks a compound query over the two endpoints?

asked 11 Dec '10, 19:45

psychemedia's gravatar image

psychemedia ♦♦
accept rate: 11%

edited 11 Dec '10, 19:47

You could download Jena and try the new SERVICE keyword

Currently it is more common to put all the data you need in one store to query it.

This answer is marked "community wiki".

answered 14 Jan '11, 23:46

keithalexander's gravatar image

accept rate: 0%

Is this available on the Talis platform?

(15 Jan '11, 09:19) kitwallace

The SERVICE keyword is a SPARQL 1.1 keyword, so any endpoint that is SPARQL 1.1 conform can do that. Have a look at w3c working draft . Talis seems to work on SPARQL1.1 at least since February 2011 so I would assume you can use SERVICE, give it a try :)

(30 Apr, 09:33) dr0i
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]( "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



Asked: 11 Dec '10, 19:45

Seen: 1,034 times

Last updated: 10 May, 09:24

powered by OSQA