DebugQueries: Difference between revisions
(Added: Unlinked Resources) |
(Added access to backlink query) |
||
Line 2: | Line 2: | ||
__TOC__ | __TOC__ | ||
= Useful Queries = | |||
A List of accessible queries, that are usefull to understand the structure of the graph and identify problems, such as missing links. | |||
== Backlinks == | |||
'''A query that finds all backlinks to a specific item.''' | |||
{{SPARQL2|query= | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
PREFIX wd: <https://graphit.ur.de/entity/> | |||
SELECT DISTINCT ?source ?sourceLabel | |||
WHERE { | |||
?source wdt:P1 wd:Q61. | |||
service wikibase:label { bd:serviceParam wikibase:language "en". } | |||
} | |||
}} | |||
---- | |||
= Missing Properties = | = Missing Properties = |
Revision as of 14:56, 18 August 2023
This page contains several SPARQL-Queries to help debug the graph.
Useful Queries
A List of accessible queries, that are usefull to understand the structure of the graph and identify problems, such as missing links.
Backlinks
A query that finds all backlinks to a specific item.
Items used: GLSL (Q61)
Properties used: depends on (P1)
PREFIX wdt: <https://graphit.ur.de/prop/direct/>
PREFIX wd: <https://graphit.ur.de/entity/>
SELECT DISTINCT ?source ?sourceLabel
WHERE {
?source wdt:P1 wd:Q61.
service wikibase:label { bd:serviceParam wikibase:language "en". }
}
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.