Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rdf file from sparql endpoint

I am new in opendata and need some help. Wikipedia have their sparql endpoint in this url: http://dbpedia.org/sparql Now I need to write webservice to get some rdf file from dbpedia. What should I send to this endpoint to get rdf file ?

like image 553
hudi Avatar asked Dec 06 '22 15:12

hudi


1 Answers

Send a CONSTRUCT query. A little example:

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

The WHERE clause works just like that of SELECT only the values fill the CONSTRUCT block as a kind of template. It's very flexible - you can either copy statements as here or transform them into a completely different shape.

like image 172
danja Avatar answered Jan 09 '23 03:01

danja