Closed teledyn closed 6 years ago
I don't know if I understood correctly your request. Just in case, is this link useful for this issue ? https://stackoverflow.com/questions/47290338/python-how-to-add-information-from-dbpedia-to-my-graph-using-rdflib
Thanks -- the second example on that page works, so that's good enough validation -- I wonder now if my troubles with this may be a quirk of Amazon's Neptune, but at least now I have a test case to compare.
Thanks @teledyn . BTW, do you know any open Amazon Neptune instance, where SPARQL Wrapper can be tested on?
I was trying to use the examples in the README (as applied to an AWS Neptune endpoint) to produce either CONSTRUCT or SELECT queries that could be parsed by rdflib.Graph, and tried all the options but the results .convert() output was giving me Document and Binding objects (and JSON) with no clear path to then convert these into a form rdflib would accept. Document did have toxml(), but it wasn't the xml parse(format='xml') would except.
The query was very simple,
or alternatively, to CONSTRUCT those found triples. I also tried adding the header "Accept: application/sparql-results+xml" as is needed by Neptune, just in case the call did not already add this.
My endpoint SPARQLWrapper (or Wrapper2) connects, and the query().convert() does contain the values, and tried XML, RDFXML and N3 that do respond, just not in a form where I could find a pathway into rdflib.Graph for local queries. Is there a step missing from the README docs?