Closed williamwong101 closed 4 years ago
@zhiyuanw101 can you repeat a similar query with different data and get a similar result? It's important to know if this is some kind of data-dependent, one-off or truly a code issue within SPARQLWrapper.
@zhiyuanw101 you're using the SparqlWrapper
w/o setting a graph parameter.
when querying via the http://dbpedia.org/sparql UI the graph IRI is set to http://dbpedia.org
by default,
so if you use this:
mySparql = sparqlwr.SPARQLWrapper('http://dbpedia.org/sparql')
mySparql.addParameter("default-graph-uri", "http://dbpedia.org") # this is where you set the graph
mySparql.setQuery(your_query_here)
mySparql.setReturnFormat(sparqlwr.CSV)
you will have exactly the same result set as you would have querying via the web GUI
@nicholascar this issue can be closed as unreproducible/not an issue
Thanks @eknutov
I tried the following SPARQL:
Both directly on http://dbpedia.org/sparql and the wrapper, however, they end up with different result, for example the pair
is missing from the wrapper result