Page MenuHomePhabricator

tweak SPARQL queries that expose constraint violations
Closed, InvalidPublic

Description

The SPARQL queries that expose constraint violations return the offending statement.
But the statement URL is opaque: it's more useful to return the offending value (eg one can use it to generate a QS script to remove offending values).

Eg for P2088 Distinct Values, change SPARQL (new) to this:

SELECT DISTINCT ?item ?itemLabel ?value WHERE {
	?statement wikibase:hasViolationForConstraint wds:P2088-DD4CDCEA-B3F6-4F02-9CFB-4A9E312B73A8 .
	?item p:P2088 ?statement .
	?statement ps:P2088 ?value.
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}