Comments (6)
this is weird as i'm using it on a daily basis for result sets up to 1M rows...
can you provide some simplistic example showing the bug?
from sparqlwrapper.
Hello Jörn,
I think the problem is related with the parsing of the results from Sesame/openrdf: by default is truncating the results to 100.
I tried to make this query in the Sesame/openRDF query console:
SELECT ?a
WHERE {
?a ?b ?c
}
It generates the following URL: http://localhost:8080/openrdf-workbench/repositories/12345/query?action=exec&queryLn=SPARQL&query=SELECT%20%3Fa%20%0AWHERE%20{%20%0A%3Fa%20%3Fb%20%3Fc%0A}%0A&limit=100&infer=true&
As you can see is adding &limit=100 that limits the results to 100. Nevertheless, if manually changing limit=100 for limit=0 it returns all the results.
I was wondering if the easiest way to solve this could be to append a limit=0 to the query URL generated by sparqlwrapper.
How do you see that?
PS: To launch the previous query with sparqlwrapper I am doing it this way:
sparql = SPARQLWrapper("http://localhost:8080/openrdf-workbench/repositories/12345/query")
sparql.setQuery(queryString) #queryString has the query I wrote at the beginning of the comment
sparql.method='GET'
sparql.setReturnFormat(XML)
inXML = sparql.query().convert().toxml()
from sparqlwrapper.
uhm, there probably is a way to change the default limit / disable it in your openrdf workbench, but that doesn't seem to be an issue with SPARQLWrapper...
another option could maybe be to explicitly set a limit in the SPARQL Query you're doing?
select distinct ?s where { ?s ?p ?o } limit 100000000
from sparqlwrapper.
Hey Jörn,
I also thought in trying this before posting here and it doesn't work: is limiting the number of results to 100000000 but still truncating the number of results to 100 per page. Then (I guess) when the scrapping is done, the sparqlwrapper only have 100 results there.
I have solved the problem adding the limit=0 in the request URL, to do this I use the addParameter(key,value) function:
sparql = SPARQLWrapper("http://localhost:8080/openrdf-workbench/repositories/12345/query")
sparql.addParameter('limit','0')
Thanks for your time, hope it helps somebody else in the future!
from sparqlwrapper.
👍
from sparqlwrapper.
👍
I was not aware either of such default limit from workbench's endpoint. Try to ask at sesame-users if such configuration can be changed or disabled.
from sparqlwrapper.
Related Issues (20)
- Next Release? HOT 20
- Introduce Lint tools
- Convert SPARQLWrapper.SmartWrapper to pandas dataframe HOT 6
- Removing https://rdflib.github.io/sparqlwrapper HOT 4
- Documentation format HOT 4
- using "describe" in a comment leads to error HOT 12
- Organize old PRs/Issues
- Make tests faster and more reliable.
- TLS changes in Python 3.10, insecure endpoint
- Allow earlier versions of rdflib HOT 2
- Test failures probably due to remote service issues
- Cannot install with conda for Python >=3.10 HOT 2
- QueryBadFormed: A bad request has been sent to the endpoint
- WikiData Not Returning CSV HOT 1
- Can't use SPARQLWrapper in nix-shell (somewhat OT)
- AWS Signature Version 4 Authentication Support HOT 2
- Align query result types with rdflib
- Unable to query the rdf:type HOT 3
- 405 (Method not allowed) for SELECT QUERY with # street address in comment HOT 2
- GraphDB 10.2.2: b'Missing parameter: query' on INSERT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparqlwrapper.