{"id":410,"date":"2016-07-26T15:03:29","date_gmt":"2016-07-26T14:03:29","guid":{"rendered":"http:\/\/blog.magnusmanske.de\/?p=410"},"modified":"2016-08-03T09:20:03","modified_gmt":"2016-08-03T08:20:03","slug":"wdq-obsolete","status":"publish","type":"post","link":"http:\/\/magnusmanske.de\/wordpress\/archives\/410","title":{"rendered":"WDQ, obsolete?"},"content":{"rendered":"<p>Since a few years, I run the <a href=\"http:\/\/wdq.wmflabs.org\/\">WikiData Query<\/a> tool (WDQ) to provide a query functionality to Wikidata. Nowadays, the (confusingly similarly named) SPARQL-based <a href=\"https:\/\/query.wikidata.org\/\">WDQS<\/a> is the &#8220;official&#8221; way to query Wikidata. WDQS has been improving a lot, and while some of my tools still support WDQ, I deliberately left that option out of new tools like <a href=\"http:\/\/petscan.wmflabs.org\/\">PetScan<\/a>. But before I shut down WDQ, and the tools that use it, for good, I wanted to know if it is still used, and if SPARQL could take over.<\/p>\n<p>I therefore added a query logger to <a href=\"https:\/\/tools.wmflabs.org\/autolist\/autolist1.html\">Autolist1<\/a> and <a href=\"https:\/\/tools.wmflabs.org\/autolist\/\">Autolist2<\/a>. The logs contain all WDQ queries run through those tools. I will monitor the results for a while, but here is what I saw so far. I will comment on translating the query to SPARQL using <a href=\"https:\/\/tools.wmflabs.org\/wdq2sparql\/w2s.php\">WDQ2SPARQL<\/a>, the general ability for such queries, and the performance of WDQS. &#8220;OK&#8221; means the query could be converted automatically to SPARQL, runs, and produces a similar (as in, equal or more up-to-date) result.<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\n<thead>\n<tr>\n<th>WDQ<\/th>\n<th>Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>CLAIM[279:13219666]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>BETWEEN[569,1016-1,1016-12]<\/td>\n<td><s>BETWEEN not implemented in WDQS, but manual translation feasible<\/s><\/p>\n<p><em>Update<\/em>: This has been implemented by\u00a0smalyshev no, runs OK!<\/td>\n<\/tr>\n<tr>\n<td>(CLAIM[1435:10387684] OR CLAIM[1435:10387575]) AND NOCLAIM[380] AND NOCLAIM[481]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>BETWEEN[569,1359-1,1359-12]<\/td>\n<td><s>BETWEEN not implemented in WDQS, but manual translation feasible<\/s><\/p>\n<p><em>Update<\/em>: This has been implemented by\u00a0smalyshev no, runs OK!<\/td>\n<\/tr>\n<tr>\n<td>CLAIM[31:5]<\/td>\n<td>\u00a0All humans ~3.2M humans on Wikidata. Not really a useful query in these tools.<\/td>\n<\/tr>\n<tr>\n<td>Q22686<\/td>\n<td>\u00a0Single item. Doesn&#8217;t really need a query?<\/td>\n<\/tr>\n<tr>\n<td>Q22686<\/td>\n<td>\u00a0Single item. Doesn&#8217;t really need a query?<\/td>\n<\/tr>\n<tr>\n<td>CLAIM[106:170790] AND CLAIM[27:35]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>CLAIM[195:842858]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>Gustav III<\/td>\n<td>\u00a0What the hell?<\/td>\n<\/tr>\n<tr>\n<td>claim[17]<\/td>\n<td>\u00a0All items with &#8220;country&#8221;. Not really a useful query in these tools.<\/td>\n<\/tr>\n<tr>\n<td>claim[31]<\/td>\n<td>\u00a0All items with &#8220;instance of&#8221;. Not really a useful query in these tools.<\/td>\n<\/tr>\n<tr>\n<td>claim[106:82955] and claim[509:(tree[12078][][279])]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>claim[31:5]<\/td>\n<td>\u00a0\u00a0All humans ~3.2M humans on Wikidata. Not really a useful query in these tools.<\/td>\n<\/tr>\n<tr>\n<td>claim[31:5]<\/td>\n<td>\u00a0\u00a0All humans ~3.2M humans on Wikidata. Not really a useful query in these tools.<\/td>\n<\/tr>\n<tr>\n<td>claim[21]<\/td>\n<td>\u00a0All items with gender. Not really a useful query in these tools.<\/td>\n<\/tr>\n<tr>\n<td>LINK[lvwiki] AND CLAIM[31:5]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>LINK[lvwiki] AND CLAIM[31:5]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>claim[27] and noclaim[21]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>LINK[lvwiki] AND CLAIM[31:56061]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>LINK[lvwiki] AND tree[56061][150][17,279]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<tr>\n<td>claim[31:(tree[16521][][279])]<\/td>\n<td>\u00a0OK<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As far as I can tell, SPARQL could take over for WDQ immediately.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since a few years, I run the WikiData Query tool (WDQ) to provide a query functionality to Wikidata. Nowadays, the (confusingly similarly named) SPARQL-based WDQS is the &#8220;official&#8221; way to query Wikidata. WDQS has been improving a lot, and while some of my tools still support WDQ, I deliberately left that option out of new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-410","post","type-post","status-publish","format-standard","hentry","category-wikidata"],"_links":{"self":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/comments?post=410"}],"version-history":[{"count":4,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/410\/revisions"}],"predecessor-version":[{"id":415,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/410\/revisions\/415"}],"wp:attachment":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/media?parent=410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/categories?post=410"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/tags?post=410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}