Niharika Roy
Niharika Roy

Reputation: 113

performing sparql query on the rdf data stored in relational database

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.

Upvotes: 0

Views: 814

Answers (1)

Ted Lawless
Ted Lawless

Reputation: 860

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

Upvotes: 1

Related Questions