How can I insert variable into SPARQL query?
How can I insert variable into SPARQL query? Question: I use the rdflib library. I need to insert a variable into a SPARQL query. I do this: q = prepareUpdate("""INSERT DATA { <r> a <owl:Ontology> }""") g.update(q, initBindings={‘r’: uri}) uri = ‘http://www.example.org/ontologies/example/example.owl’ g – object class Graph() Output result: <r:> a <owl:Ontology> . Required result: …