联邦SPARQL-从两个数据集返回信息

时间:2019-03-18 21:55:19

标签: sparql jena federated-queries

我想从这两个数据集中返回所有信息,而不合并它们,而只是简单地返回其中任何一个都匹配的所有信息,而不必担心该数据是否存在于另一个数据库中。

到目前为止,我是最接近的:

PREFIX table: <https://data.nasa.gov/ontologies/atmonto/NAS#>
select ?name ?icao ?iata ?name2 ?icao2 ?iata2
where {

  SERVICE <http://localhost:3030/nasa/query> 
  {
      ?subject  table:icaoAirportCode   ?icao .
      ?subject  table:iataAirportCode   ?iata .
      ?subject  table:airportName   ?name .
  }

SERVICE <http://localhost:3030/newOurDb/query> 
{
    ?airport    table:icaoAirportCode   ?icao2 .
      ?airport  table:iataAirportCode   ?iata2 .
      ?airport  table:airportName   ?name2 .
}
}

但这需要复制列。我可以问两个数据库,但仍然只有3列吗?

0 个答案:

没有答案
相关问题