DBpedia から映画に関するデータを取得する必要があります。
http://dbpedia-live.openlinksw.com/sparqlで次のように SPARQL クエリを使用します。
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?subject ?label ?released WHERE {
?subject rdf:type <http://dbpedia.org/ontology/Film>.
?subject rdfs:label ?label.
?subject <http://dbpedia.org/ontology/releaseDate> ?released.
FILTER(xsd:date(?released) >= "2000-01-01"^^xsd:date).
} ORDER BY ?released
LIMIT 20
2000 年 1 月 1 日以降にリリースされた映画を取得しようとしました。しかし、エンジンは次のように答えます。
Virtuoso 22007 Error DT006: Cannot convert 2009-06-31 to datetime :
Too many days (31, the month has only 30)
SPARQL query:
define sql:big-data-const 0
#output-format:text/html
define sql:signal-void-variables 1 define input:default-graph-uri <http://dbpedia.org> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?subject ?label ?released WHERE {
?subject rdf:type <http://dbpedia.org/ontology/Film>.
?subject rdfs:label ?label.
?subject <http://dbpedia.org/ontology/releaseDate> ?released.
FILTER(xsd:date(?released) >= "2000-01-01"^^xsd:date).
} ORDER BY ?released
LIMIT 20
私が理解できる限り、DBpedia のデータにはいくつかのエラーがあり、エンジンは設定した日付と比較するために文字列データを日付型に変換できません。そして、エンジンはクエリの実行を中断します。
問題は、エラーのあるデータをすべてスキップして、処理可能なすべてのデータを返すようにエンジンに指示する方法はありますか?