On 13.02.2016 23:56, Kingsley Idehen wrote:
On 2/13/16 4:56 PM, Markus Kroetzsch wrote:
...
For a page-size of 20 (covered by LIMIT) you can move through offets of 20 via:
To clarify: I just added the LIMIT to prevent unwary readers from killing their browser on a 100MB HTML result page. The server does not need it at all and can give you all result at once. Online applications may still want to scroll results, I agree, but for the OP it would be more useful to just donwload one file here.
Markus
First call: PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> select ?item ?gndId where { ?item wdt:P227 ?gndId ; # get gnd ID wdt:P31 wd:Q5 . # instance of human } ORDER BY ASC(?gndId) OFFSET 10 LIMIT 10 Next call: PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> select ?item ?gndId where { ?item wdt:P227 ?gndId ; # get gnd ID wdt:P31 wd:Q5 . # instance of human } ORDER BY ASC(?gndId) OFFSET 20 LIMIT 10 Subsequent Calls: PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> select ?item ?gndId where { ?item wdt:P227 ?gndId ; # get gnd ID wdt:P31 wd:Q5 . # instance of human } ORDER BY ASC(?gndId) OFFSET {last-offset-plus-20} LIMIT 10 Remember, you simply change the OFFSET value in the SPARQL HTTP URL. _______________________________________________ Wikidata mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata
-- Markus Kroetzsch Faculty of Computer Science Technische Universität Dresden +49 351 463 38486 http://korrekt.org/ _______________________________________________ Wikidata mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata
