you are welcome Jean-Claude, BTW wikidata SPARQL query questions can be best discussed over at the wikidata mailing lists / sites
On Fri, Dec 20, 2019 at 11:30 AM Jean-Claude Moissinac < jean-claude.moissi...@telecom-paristech.fr> wrote: > So, the shared variable ?wikidata must be in the inner select to be seen by > both triple store. > Many thank's > -- > Jean-Claude Moissinac > > > > Le ven. 20 déc. 2019 à 11:57, Marco Neumann <marco.neum...@gmail.com> a > écrit : > > > PREFIX wdt: <http://www.wikidata.org/prop/direct/> > > PREFIX wikibase: <http://wikiba.se/ontology#> > > PREFIX bd: <http://www.bigdata.com/rdf#> > > SELECT * where{ > > bind(<http://www.wikidata.org/entity/Q640447> as ?wikidata). > > SERVICE <https://query.wikidata.org/bigdata/namespace/wdq/sparql> { > > select ?wikidata ?p ?propLabel ?o ?oLabel where { > > ?wikidata ?p ?o . ?prop wikibase:directClaim ?p . > > SERVICE wikibase:label {bd:serviceParam wikibase:language "en,fr" .} > > } } } > > > > On Fri, Dec 20, 2019 at 10:56 AM Marco Neumann <marco.neum...@gmail.com> > > wrote: > > > > > ok I see, how about the following > > > > > > > > > On Fri, Dec 20, 2019 at 9:34 AM Jean-Claude Moissinac < > > > jean-claude.moissi...@telecom-paristech.fr> wrote: > > > > > >> In the second code, the bind must be inside the service <...> {...} > > >> -- > > >> Jean-Claude Moissinac > > >> > > >> > > >> > > >> Le jeu. 19 déc. 2019 à 16:48, Jean-Claude Moissinac < > > >> jean-claude.moissi...@telecom-paristech.fr> a écrit : > > >> > > >> > Hello > > >> > > > >> > In an instance of Fuseki, I'm trying the following query > > >> > > > >> > PREFIX wdt: <http://www.wikidata.org/prop/direct/> > > >> > > > >> > prefix wikibase: <http://wikiba.se/ontology#> > > >> > > > >> > PREFIX bd: <http://www.bigdata.com/rdf#> > > >> > > > >> > SELECT * where > > >> > > > >> > { > > >> > > > >> > bind(<http://www.wikidata.org/entity/Q640447> as ?wikidata) > > >> > > > >> > service <https://query.wikidata.org/bigdata/namespace/wdq/sparql> { > > >> > > > >> > select ?p ?propLabel ?o ?oLabel where { > > >> > > > >> > ?wikidata ?p ?o . ?prop wikibase:directClaim ?p . SERVICE > > >> wikibase:label { > > >> > bd:serviceParam wikibase:language "en,fr" . > > >> > > > >> > } } } } > > >> > > > >> > > > >> > which fails with an error 500 (Error 500: HTTP 500 error making the > > >> query: > > >> > Internal Server Error) > > >> > > > >> > While the following one gives results: > > >> > > > >> > PREFIX wdt: <http://www.wikidata.org/prop/direct/> > > >> > > > >> > prefix wikibase: <http://wikiba.se/ontology#> > > >> > > > >> > PREFIX bd: <http://www.bigdata.com/rdf#> > > >> > > > >> > SELECT * where { > > >> > > > >> > bind(<http://www.wikidata.org/entity/Q640447> as ?wikidata) > > >> > > > >> > service <https://query.wikidata.org/bigdata/namespace/wdq/sparql> { > > >> > > > >> > select ?p ?propLabel ?o ?oLabel where { > > >> > > > >> > <http://www.wikidata.org/entity/Q640447> ?p ?o . > > >> > > > >> > ?prop wikibase:directClaim ?p . SERVICE wikibase:label { > > bd:serviceParam > > >> > wikibase:language "en,fr" . > > >> > > > >> > } } } } > > >> > > > >> > > > >> > In my real query, in place of the bind, I have some code which > selects > > >> > some wikidata entities. The goal is to get a wikidata description of > > >> these > > >> > entities > > >> > > > >> > Have you some ideas? > > >> > > > >> > > > >> > -- > > >> > Jean-Claude Moissinac > > >> > > > >> > > > >> > > > > > > > > > -- > > > > > > > > > --- > > > Marco Neumann > > > KONA > > > > > > > > > > -- > > > > > > --- > > Marco Neumann > > KONA > > > -- --- Marco Neumann KONA