From a0e5225ffa72df255a988360c898772ca88fbfca Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Tue, 11 Aug 2020 16:46:49 +0200 Subject: [PATCH] =?UTF-8?q?f=C3=BCr=20ersten=20Import=20Titel=20ohne=20Exe?= =?UTF-8?q?mplare=20l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/03-ba-sachsen.sh | 70 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/tasks/03-ba-sachsen.sh b/tasks/03-ba-sachsen.sh index c0b511a..31db0f1 100755 --- a/tasks/03-ba-sachsen.sh +++ b/tasks/03-ba-sachsen.sh @@ -62,7 +62,72 @@ echo checkpoint "Transform"; echo -# ------------------------ 01 PPN anreichern über ISBN ----------------------- # +# -------------------------- 01 Titel ohne Exemplare ------------------------- # + +# TODO: Temporäres Löschen durch Generierung von Lax-Sätzen ersetzen +echo "Titel ohne Exemplare löschen..." +if curl -fs \ + --data project="${projects[$p]}" \ + --data-urlencode "operations@-" \ + "${endpoint}/command/core/apply-operations$(refine_csrf)" > /dev/null \ + << "JSON" + [ + { + "op": "core/row-removal", + "engineConfig": { + "facets": [ + { + "type": "list", + "name": "2199", + "expression": "isBlank(value)", + "columnName": "2199", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": false, + "l": "false" + } + } + ], + "selectBlank": false, + "selectError": false + }, + { + "type": "list", + "name": "7100f", + "expression": "isBlank(value)", + "columnName": "7100f", + "invert": false, + "omitBlank": false, + "omitError": false, + "selection": [ + { + "v": { + "v": true, + "l": "true" + } + } + ], + "selectBlank": false, + "selectError": false + } + ], + "mode": "row-based" + } + } + ] +JSON +then + log "transformed ${p} (${projects[$p]})" +else + error "transform ${p} (${projects[$p]}) failed!" +fi +echo + +# ------------------------ 02 PPN anreichern über ISBN ----------------------- # # TODO: Anreicherung für 0110 # spec_Z_04 @@ -277,7 +342,7 @@ else fi echo -# --------------------------- 02 Exemplare clustern -------------------------- # +# --------------------------- 03 Exemplare clustern -------------------------- # # TODO: 0110 berücksichtigen # spec_Z_05 @@ -397,7 +462,6 @@ else fi echo - # ================================== EXPORT ================================== # checkpoint "Export"; echo