Files
app-organization-portal/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430142110-chore--move-werkingsgebieden-to-public-graph.sparql
mirdono c6b74f6a1c refactor: move werkingsgebieden to public graph
The data on werkingsgebieden was largely duplicated across two graphs the shared
graph and administrative unit graph. Some exceptions were that werkingsgebieden
with level "referentieregio" were only in the shared graph, whereas
werkingsgebieden for new municipalities that resulted from the 2025 mergers were
only in the administrative unit graph.

This moves all the werkingsgebieden and their corresponding data to the public
graph, resolving the duplication in the process. Furthermore, the `public` and
`organizations` producers are update to only look in the public graph for
locations.
2025-05-06 11:49:47 +02:00

23 lines
524 B
SPARQL

PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
DELETE {
GRAPH ?sourceGraph {
?werkingsgebied ?p ?o .
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/public> {
?werkingsgebied ?p ?o .
}
} WHERE {
GRAPH ?sourceGraph {
?werkingsgebied a prov:Location ;
ext:werkingsgebiedNiveau ?level ;
?p ?o .
}
VALUES ?sourceGraph {
<http://mu.semte.ch/graphs/administrative-unit>
<http://mu.semte.ch/graphs/shared>
}
}