DebugQueries: Difference between revisions

(Created page + added 3 debug queries)
 
m (added: Orphans)
Line 63: Line 63:


----
----
== Orphans ==
''' Returns all items, that don't link to any other items and are not linked to in return.'''
NOTE: Not sure if this works.
{{#widget:SPARQLquery|code=
# All items that don't linkt to another item (no dependency)
#defaultView:Table
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
SELECT ?source ?sourceLabel ?resource ?resourceLabel
WHERE {
  ?source wdt:P2 ?class. # get all items that have a subclass.
  MINUS {?dependency wdt:P1 ?source}. # Remove all items that have the ?source as a dependency
  MINUS {?source wdt:P1 ?dependency}. # Remove all items that have a dependency
 
  service wikibase:label { bd:serviceParam wikibase:language "en" }
}
}}

Revision as of 13:39, 18 August 2023

This page contains several SPARQL-Queries to help debug the graph.

Missing Properties

No Resources

Returns all Items, that don't have any resource that they link to.

Note: Only searches through items that have a subclass, to avoid duplicates


No Subclass

Returns all Items, that don't have a property subclass.


No Dependencies

Returns all Items, that don't link any other items as dependency.

These items don't have a property depends on. This could mean, that they are a source or that they are orphaned.


Orphans

Returns all items, that don't link to any other items and are not linked to in return.

NOTE: Not sure if this works.