You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/de/migration.md
+2
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,8 @@ Diese URLs sollten gültig und auflösbar sein.
155
155
Der Host-Teil dieser URLs wird aus der Anfrage generiert.
156
156
157
157
## Migration der Mets-Datei
158
+
**Achtung** Bitte erstellen Sie vorher ein Backup. In einigen Fällen sind die mets-Dateien inkonsistent, d. h. die gespeicherten Werte und Vokabularreferenzen stimmen nicht überein. Das Migrationsskript verwendet die Vokabularreferenzen, um die richtigen Werte zu finden. Wenn die Vokabularreferenzen falsch und die Werte richtig sind, wird die Migration die Datenintegrität korrumpieren!
159
+
158
160
Dieser Schritt kann nur durchgeführt werden, wenn die Migration der Vokabulardaten erfolgreich abgeschlossen wurde!
159
161
160
162
Wenn die Datei `migration.csv` vorhanden ist, führen Sie den folgenden Befehl in der aktivierten Python-Umgebung aus:
Copy file name to clipboardexpand all lines: docs/en/migration.md
+2
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,8 @@ blau,123
127
127
This file maps all record values to the corresponding record IDs in the reference vocabulary.
128
128
129
129
## Mets file migration
130
+
**Caution** Please create a backup beforehand. In some cases the mets files are inconsistent, i. e. the stored values and vocabulary references do not match. The migration script uses the vocabulary references to find the correct values. If the vocabulary references were wrong and the values correct, the migration will corrupt the data!
131
+
130
132
This step can only be done after the vocabulary data migration has been successfully completed!
131
133
132
134
With the `migration.csv` file present, run the following command in the activated Python environment:
raiseException(f'Record search for search term "{search_term}" has no results')
134
+
raiseException(f'Record search in vocabulary "{vocabulary_id}" for search term "{search_term}" has no results')
124
135
eliflen(results) >1:
125
-
raiseException(f'Record search for search term "{search_term}" has no unique result, {len(results)} records found')
136
+
ids= [r['id'] forrinresults]
137
+
raiseException(f'Record search in vocabulary "{vocabulary_id}" for search term "{search_term}" has no unique result, {len(results)} records found: {ids}')
# use second column of vocabulary: `Reverse relationship` (The relation vocabulary is specified from `A->B`, the relation references an entity of type `A` and is therefore of type `B`)
parser.add_argument('--vocabulary-server-port', type=str, default='8081', help='vocabulary server port')
40
40
parser.add_argument('--vocabulary-server-token', type=str, default=None, help='vocabulary server security token')
41
41
parser.add_argument('--preferred-mets-main-value-language', type=str, default='eng', help='Default language to use for mets value writing, if present and prior value invalid')
42
+
parser.add_argument('--trust', required=False, type=str, default='ID', help='Set the data source to trust for the migration. Possible values are: "ID" and "Value". If "ID" is set, the record ID is parsed from the valueURI and used to find the migrated record. If "Value" is set, the XML elements value is used to find the newly migrated record by value. Defaults to "ID".')
43
+
parser.add_argument('--enable-relation-vocabulary-column-logic', required=False, default=False, action='store_const', const=True, help='Activate relationship vocabulary correct column finding logic (reverse vs non-reverse, artist dictionary)')
42
44
parser.add_argument('--manual-id-fix', type=str, default=None, help='Manually fix the record ID of elements whose name attribute matches this parameter. Caution, this must not be executed twice!')
0 commit comments