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 <[email protected]>
wrote:

> ok I see, how about the following
>
>
> On Fri, Dec 20, 2019 at 9:34 AM Jean-Claude Moissinac <
> [email protected]> 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 <
>> [email protected]> 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

Reply via email to