I have stored large amount of RDF data into a relational database with the help of rdflib_sqlalchemy.SQLAlchemy.Now I want to execute Sparql query over the same.I can not find any thing to know how to implement sparql query here. Can anyone help.
Asked
Active
Viewed 702 times
1 Answers
1
Including sample code would make it easier to know what you are after but see the documentation on querying an RDFLib graph with SPARQL.
Using the example from the rdflib-sqlalchemy README where graph is the name of the open graph.
rq = "select ?s where {?s ?p ?o} limit 10"
results = graph.query(rq)
for row in results:
print row.s

Jörn Hees
- 3,338
- 22
- 44

Ted Lawless
- 830
- 6
- 6