Re: [Wikidata] [Bigdata-developers] Listing named graphs in Wikidata service
Hi Stas, On 21-04-2017 15:04, Stas Malyshev wrote: Hi! You agree with me that this query : `select distinct ?g { graph ?g {?s ?p ?o} }` seems to be a valid SPARQL query, but throws an error in WDQS service [1]. It is a valid SPARQL query, but what you're essentially asking is to download whole 1.8b triples in a single query. There's no way we can deliver this in one minute, which is current constraint on queries, neither we want to enable queries like this - they are very resource-intensive and serve little purpose. If you want to work with huge data sets or import the whole data, you may look either into getting the dump download and processing it with offline tools like Wikidata Toolkit[2], or using our LDF server[1] which is lightweight and allows you to work with the data much more efficiently. While not having a strong opinion on the question of whether or not WDQS should support graph queries if it doesn't have named graphs, I disagree on the minor technical point that that query requires streaming all data. It simply asks for a unique list of all named graphs. Typically that will be much smaller than the entire data. (Of course a naive implementation might stream everything to compute the query, but that's another matter I think.) Cheers, Aidan ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Re: [Wikidata] [Bigdata-developers] Listing named graphs in Wikidata service
Hi! > You agree with me that this query : > `select distinct ?g { graph ?g {?s ?p ?o} }` seems to be a valid SPARQL > query, but throws an error in WDQS service [1]. It is a valid SPARQL query, but what you're essentially asking is to download whole 1.8b triples in a single query. There's no way we can deliver this in one minute, which is current constraint on queries, neither we want to enable queries like this - they are very resource-intensive and serve little purpose. If you want to work with huge data sets or import the whole data, you may look either into getting the dump download and processing it with offline tools like Wikidata Toolkit[2], or using our LDF server[1] which is lightweight and allows you to work with the data much more efficiently. [1] https://www.mediawiki.org/wiki/Wikidata_query_service/User_Manual#Linked_Data_Fragments_endpoint [2] https://www.mediawiki.org/wiki/Wikidata_Toolkit -- Stas Malyshev smalys...@wikimedia.org ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Re: [Wikidata] [Bigdata-developers] Listing named graphs in Wikidata service
Thanks Stas! It's clear that a user might ask any type of query from an endpoint according to her needs. My concern goes further on whether such queries are valid or not in the underlying RDF graph (in this case BLZ) regarding SPARQL 1.1 spec. You agree with me that this query : `select distinct ?g { graph ?g {?s ?p ?o} }` seems to be a valid SPARQL query, but throws an error in WDQS service [1]. Any thoughts on this? Best, Ghislain [1] https://goo.gl/hdJwUk El jue., 20 abr. 2017 a las 21:54, Stas Malyshev () escribió: > Hi! > > > I wanted to test the use of the queries below to list named graphs (if > > any) in wikidata service [a]. I've tried them without success: > > We do not use any subgraphs in WDQS, so I don't think that query would > produce much of a useful result. > > -- > Stas Malyshev > smalys...@wikimedia.org > -- --- "Love all, trust a few, do wrong to none" (W. Shakespeare) Web: http://atemezing.org ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Re: [Wikidata] [Bigdata-developers] Listing named graphs in Wikidata service
Hi! > I wanted to test the use of the queries below to list named graphs (if > any) in wikidata service [a]. I've tried them without success: We do not use any subgraphs in WDQS, so I don't think that query would produce much of a useful result. -- Stas Malyshev smalys...@wikimedia.org ___ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata