Page MenuHomePhabricator

[NEEDS GROOMING] Update example queries in WDQS query UI
Open, Needs TriagePublic

Description

As part of the migration away from Blazegraph, we adopting the SPARQL 1.1 standard and no longer supporting Blazegraph-specific syntax. The query UI (https://query.wikidata.org/) provides example queries for users. These need to be updated to the new syntax standard and tested on the new endpoints.

https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples

Event Timeline

The example queries should probably only be updated once query.wikidata.org is powered by the new system. Otherwise people will get broken queries when they select them from the example dialog.

FYI ... the Phab tickets to define the query rewrites are sub-tasks of T424306.

And, I created a small notebook that analyzed the current set (395) of examples. Here is the breakdown of Blazegraph features in the examples.

Blazegraph-Specific Examples.png (1,484×1,392 px, 210 KB)

https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples

To clarify, since I think this wasn’t spelled out here so far: the WDQS GUI loads its examples directly from that wiki page; any changes to the page are reflected in the GUI immediately (assuming you’re using it in English; other languages need to wait for the page to be marked for translation first, I think). If necessary, we could make the new-backend version of the WDQS GUI load its examples from another page, but that would need some more work.

The example queries should probably only be updated once query.wikidata.org is powered by the new system. Otherwise people will get broken queries when they select them from the example dialog.

Only if the updated queries are broken in Blazegraph. I expect there are some queries that can be made compatible with the new backend without dropping compatibility with the old backend. (Though they might perform worse in Blazegraph – I’m guessing that most of the time, people didn’t reach for e.g. query hints or named subqueries for no reason :/)

(And regarding the list in T421427#11900199, I’ll point out once again that it is my firm belief that the new system has to support the label service. There are countless queries out there using the label service – you can’t break all of those at the same time, nor can you expect everyone to rewrite their queries to a form that is far more tedious to write, more verbose, and less readable than the label service.)