DebugQueries: Difference between revisions
m (→No Resources: fixed description) |
(Added: Unlinked Resources) |
||
Line 4: | Line 4: | ||
= Missing Properties = | = Missing Properties = | ||
== No Resources == | == Resources == | ||
=== No Resources === | |||
'''Returns all Items, that don't have any [[Property:P21|resource]] that they link to.''' | '''Returns all Items, that don't have any [[Property:P21|resource]] that they link to.''' | ||
Line 18: | Line 19: | ||
?source wdt:P2 ?class. | ?source wdt:P2 ?class. | ||
MINUS {?source wdt:P21 ?resource.} | MINUS {?source wdt:P21 ?resource.} | ||
service wikibase:label { bd:serviceParam wikibase:language "en". } | |||
} | |||
}} | |||
---- | |||
=== Unlinked Resources === | |||
'''Returns all resources, that have not been linked to any item yet.''' | |||
{{#widget:SPARQLquery|code= | |||
#Resources that aren't linked | |||
#defaultView:Table | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT DISTINCT ?source ?sourceLabel ?resource ?resourceLabel | |||
WHERE { | |||
# select all resources (they have urls) | |||
?source wdt:P20 ?url. # 151 | |||
MINUS { | |||
?dependency wdt:P21 ?source | |||
} | |||
service wikibase:label { bd:serviceParam wikibase:language "en". } | service wikibase:label { bd:serviceParam wikibase:language "en". } | ||
Line 32: | Line 54: | ||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | PREFIX wdt: <https://graphit.ur.de/prop/direct/> | ||
PREFIX wd: <https://graphit.ur.de/entity/> | PREFIX wd: <https://graphit.ur.de/entity/> | ||
SELECT DISTINCT ?source ?sourceLabel ? | SELECT DISTINCT ?source ?sourceLabel ?subclass | ||
WHERE { | WHERE { | ||
?source wdt:P1 ?dependency. | ?source wdt:P1 ?dependency. | ||
Line 52: | Line 74: | ||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | PREFIX wdt: <https://graphit.ur.de/prop/direct/> | ||
PREFIX wd: <https://graphit.ur.de/entity/> | PREFIX wd: <https://graphit.ur.de/entity/> | ||
SELECT ?source ?sourceLabel ? | SELECT ?source ?sourceLabel ?dependency | ||
WHERE { | WHERE { | ||
Line 72: | Line 94: | ||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | PREFIX wdt: <https://graphit.ur.de/prop/direct/> | ||
PREFIX wd: <https://graphit.ur.de/entity/> | PREFIX wd: <https://graphit.ur.de/entity/> | ||
SELECT ?source ?sourceLabel ? | SELECT ?source ?sourceLabel ?dependency | ||
WHERE { | WHERE { | ||
Revision as of 14:20, 18 August 2023
This page contains several SPARQL-Queries to help debug the graph.
Missing Properties
Resources
No Resources
Returns all Items, that don't have any resource that they link to.
Unlinked Resources
Returns all resources, that have not been linked to any item yet.
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.