On Apr 2, 2019, at 12:31 PM, Ingolf Kuss <KUSS@hbz-nrw.de> wrote:
Hi Zeno,
reminds me of https://issues.folio.org/browse/RMB-347 .
In Java, UUID is generated like this:String idString = UUID.randomUUID().toString();where Class UUID is imported from here:import java.util.UUID;
Don't know what this translates to in Python
CiaoIngolf
>>> Zeno Tajoli <zeno.tajoli@atcult.it> 02.04.2019 19:21 >>>
Hi to all,
to import data into Folio using FolioConsoleApplication[https://github.com/jemiller0/Folio] I need to prepare the correct .jsonfiles.
For me it is not clear how to insert a correct value into 'uuid' columns.How can I calculate uuid values ?
I see that inhttps://github.com/jemiller0/folio-migration/blob/master/lehigh_scripts/ole_assign_uuids_batch.py
the relevant python code is:
import MySQLdbimport uuidfrom datetime import datetime...def process_bib(db, bib_row):bib_uuid = uuid.uuid4()
In uuid library doc pageI see:
This module provides immutable UUID objects (the UUID class) and thefunctions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1,3, 4, and 5 UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() oruuid4(). Note that uuid1() may compromise privacy since it creates aUUID containing the computer’s network address. uuid4() creates a randomUUID....
uuid.uuid4()Generate a random UUID.
So, do we create UUID in FOLIO with 'uuid.uuid4' or similar functions inothers languages?
CheersZeno Tajoli
--Zeno TajoliSystem Librarian
@CULT SrlVia Quintino Sella, 33 - 00187 RomaTel +39 06 89873504 - Fax +39 06 89873496
Questo messaggio è destinato alle sole persone indicate e può contenereinformazioni riservate.Ogni altro uso del messaggio è vietato. Se avete ricevuto questa e-mailper errore, siete pregatidi cancellare l'originale e comunicarcelo immediatamente via e-mailall'indirizzo info@atcult.itTo unsubscribe from this list please go to http://archives.simplelists.com
To unsubscribe from this list please go to http://www.simplelists.com/confirm.php?u=qG0SS9vLBzCgdZEZ6cAjLA8WupMZuam7