federated-queries

Construct RDF graph on federated query?

雨燕双飞 提交于 2020-01-06 07:27:27
问题 I'm new to SPARQL and RDF. Bascially I have to design federated SPARQL 1.1 query over Wikidata and Dbpedia. Here's my simple query. This will select the films starring Leonardo Di Caprio. PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbr: <http://dbpedia.org/resource/> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?film WHERE { { SELECT ?film WHERE { ?film wdt:P161 wd:Q38111.

Federated SPARQL query in dbpedia and wikidata: Few questions

让人想犯罪 __ 提交于 2019-12-25 00:28:24
问题 I have following query: # endpoint used: https://query.wikidata.org/ # # PREFIX wd: <http://www.wikidata.org/entity/> # PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/resource/> SELECT DISTINCT ?musicianLabel WHERE { { # *** dbpedia *** SERVICE <http://dbpedia.org/sparql> { #SERVICE <http://lod.openlinksw.com/sparql> { ?musician a dbo:Person . { # person, who has musical genre xy ?musician dbo:genre ?genre . }

SPARQL Federated Query Not Returning All Solutions

不打扰是莪最后的温柔 提交于 2019-12-11 10:30:31
问题 This is an evolution of this question. Basically I am having trouble getting all the solutions to a SPARQL query from a remote endpoint. I have read through section 2.4 here because it seems to describe a situation almost identical to mine. The idea is that I want to filter my results from DBPedia based on information in my local RDF graph. The query is here: PREFIX ns1: <http://www.semanticweb.org/caeleanb/ontologies/twittermap#> PREFIX dbo: <http://dbpedia.org/ontology/> SELECT * WHERE { ?p

comparing labels in a federated query

空扰寡人 提交于 2019-12-11 07:08:10
问题 I have an instance of Wikibase running. I'm able to run federated queries with Wikidata successfully. I have certain queries that compare labels like this: PREFIX xwdt: <http://www.wikidata.org/prop/direct/> PREFIX xwd: <http://www.wikidata.org/entity/> PREFIX xpq: <http://www.wikidata.org/prop/qualifier/> PREFIX xps: <http://www.wikidata.org/prop/statement/> PREFIX xp: <http://www.wikidata.org/prop/> select ?item ?wditem ?itemLabel ?wid ?wditemlabel where { ?item wdt:P17 wd:Q39. ?item wdt

How can I match string labels from an external SPARQL endpoint with string labels in my local ontology?

倖福魔咒の 提交于 2019-12-11 05:19:47
问题 PREFIX ex: <http://www.semanticweb.org/caeleanb/ontologies/twittermap#> PREFIX dbo: <http://dbpedia.org/ontology/> SELECT ?name (STR(?name) AS ?strip_name) ?name2 WHERE { ?p ex:displayName ?name2 . SERVICE <http://dbpedia.org/sparql> { { ?s rdfs:label ?name . ?s rdf:type foaf:Person . } UNION { ?x rdfs:label ?name . ?x dbo:wikiPageRedirects ?s . } } FILTER(STR(?name) = ?name2) . } This is the SPARQL query that I am sending to my Stardog SPARQL endpoint (hosted locally). I know a bunch of the

Federated query with secured SPARQL endpoint

南笙酒味 提交于 2019-12-11 02:04:58
问题 I'm trying to use federated queries with Jena via a Fuseki endpoint. With the SERVICE keyword in my SPARQL query, I'm connecting to a Stardog endpoint. As it's a secured URL, the endpoint is specified as follows: http://admin:admin@url. As this is not secure, Jena shows the following message: Code: 36/HAS_PASSWORD in USER: Including passwords in URIs is deprecated. According to the docs, you can specify srv:queryAuthUser and srv:queryAuthPwd for the credentials. Is there any way to do this

SPARQL queries doesn't works without LIMIT clause

吃可爱长大的小学妹 提交于 2019-12-11 01:28:06
问题 When I execute this sentence in the nobel prize database I got error when I avoid use LIMIT clause. The next query works, because it has the LIMIT clause: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX nobel: <http://data.nobelprize.org/terms/> PREFIX cat: <http://data.nobelprize.org/resource/category/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/>

Using Wikidata label service in federated queries

醉酒当歌 提交于 2019-12-10 19:48:37
问题 I'm wondering if it is possible to use Wikidata label service in a federated query. E.g., the following query # Query from a local SPARQL enpoint select ?item ?itemLabel where { SERVICE <https://query.wikidata.org/sparql> { ?item wdt:P31 wd:Q146. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } } returns empty ?itemLabel s. How can I get also ?itemLabel s in my resultset? 回答1: You could also use the manual mode, it's just one line more in your case: PREFIX

SPARQL Speed up federated query

梦想与她 提交于 2019-11-30 18:04:42
问题 I have my own dataset and I want to perform a federated query in SPARQL. Here is the query: PREFIX : <http://myURIsNamespace#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX p: <http://www.wikidata.org/prop/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX pq: <http://www.wikidata.org/prop/qualifier/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> select * where { ?bioentity :hasMutatedVersionOf ?gene . ?gene :partOf wd

SPARQL - Insert data from remote endpoint

核能气质少年 提交于 2019-11-29 16:53:37
How can i query a remote endpoint (like endpoints of DBPedia or Wikidata ) and insert resulting triples in a local graph? So far, i know that there are commands like INSERT, ADD, COPY etc. which can be used for such tasks. What i don't understand is how to address a remote endpoint while updating my local graph. Could someone provide a minimum example or the main steps? I'm using Apache Jena Fuseki v2 on Windows and this is my query so far: PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX wd: <http://www.wikidata.org/entity/> INSERT { GRAPH <?