3

In some tutorial I'm reading, I see that you can specify the dataset separately from your query, like this:

Dataset field: http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf

query:

PREFIX foaf:  <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE {
    ?person foaf:name ?name .
}

How do I specify the dataset from within the query?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Kristian
  • 21,204
  • 19
  • 101
  • 176

1 Answers1

3

Use the FROM keyword:

PREFIX foaf:  <http://xmlns.com/foaf/0.1/>
SELECT ?name
FROM <http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf>
WHERE {
    ?person foaf:name ?name .
}

Note: use it after your SELECT statement

Kristian
  • 21,204
  • 19
  • 101
  • 176