Reputation: 1
I am trying to insert the statement into graphdb using sparqlwrapper but it says query is badly formed, what am I doing wrong ?. I couln't able to figure it out
from SPARQLWrapper import SPARQLWrapper, POST, DIGEST
sparql = SPARQLWrapper("http://localhost:7200/repositories/repo")
sparql.setHTTPAuth(DIGEST)
# sparql.setCredentials("login", "password")
sparql.setMethod(POST)
sparql.setQuery("""
PREFIX ex : <http://example.com/>
INSERT { ?system ex:has_canonical_formula ex:C2H8NPbI3. }
WHERE { ?system ex:has_formula ex:C2H8NPbI3. }
""")
results = sparql.query()
Upvotes: 0
Views: 63