To import data into Folio using FolioConsoleApplication
Zeno Tajoli
(02 Apr 2019 13:21 EDT)
|
Antw: FOLIO Data Migration To import data into Folio using FolioConsoleApplication
Ingolf Kuss
(02 Apr 2019 13:31 EDT)
|
Re: Antw: FOLIO Data Migration To import data into Folio using FolioConsoleApplication
Tod Olson
(02 Apr 2019 13:35 EDT)
|
Re: Antw: FOLIO Data Migration To import data into Folio using FolioConsoleApplication
Chris Creswell
(02 Apr 2019 13:38 EDT)
|
RE: Antw: FOLIO Data Migration To import data into Folio using FolioConsoleApplication
Theodor Tolstoy
(02 Apr 2019 14:14 EDT)
|
Re: Antw: FOLIO Data Migration To import data into Folio using FolioConsoleApplication Zeno Tajoli (02 Apr 2019 13:40 EDT)
|
RE: FOLIO Data Migration To import data into Folio using FolioConsoleApplication
Ann-Marie Breaux
(02 Apr 2019 13:51 EDT)
|
Hi Ingolf and all, in fact import java.util.UUID; String idString = UUID.randomUUID().toString(); is exctly the same of python import uuid bib_uuid = uuid.uuid4() reading the documentation in: https://docs.oracle.com/javase/6/docs/api/java/util/UUID.html#randomUUID https://docs.python.org/2.7/library/uuid.html https://docs.python.org/3/library/uuid.html Thank you very much for the info. Bye Zeno Tajoli Il 02/04/2019 19:31, Ingolf Kuss ha scritto: > Hi Zeno, > > reminds me of https://issues.folio.org/browse/RMB-347 . > > In Java, UUID is generated like this: > ( cf. > https://github.com/folio-org/raml-module-builder/blob/v23.11.0/domain-models-runtime/src/main/java/org/folio/rest/persist/PgUtil.java#L305) > 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 > > Ciao > Ingolf > > __ > > >>>> 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 .json > files. > > For me it is not clear how to insert a correct value into 'uuid' columns. > How can I calculate uuid values ? > > I see that in > https://github.com/jemiller0/folio-migration/blob/master/lehigh_scripts/ole_assign_uuids_batch.py > > the relevant python code is: > > import MySQLdb > import uuid > from datetime import datetime > ... > def process_bib(db, bib_row): > bib_uuid = uuid.uuid4() > > In uuid library doc page > [https://docs.python.org/2.7/library/uuid.html] > I see: > > This module provides immutable UUID objects (the UUID class) and the > functions 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() or > uuid4(). Note that uuid1() may compromise privacy since it creates a > UUID containing the computer’s network address. uuid4() creates a random > UUID. > ... > > uuid.uuid4() > Generate a random UUID. > > So, do we create UUID in FOLIO with 'uuid.uuid4' or similar functions in > others languages? > > Cheers > Zeno Tajoli > > > > -- > Zeno Tajoli > System Librarian > > @CULT Srl > Via Quintino Sella, 33 - 00187 Roma > Tel +39 06 89873504 - Fax +39 06 89873496 > zeno.tajoli@atcult.it > > www.atcult.it > > Questo messaggio è destinato alle sole persone indicate e può contenere > informazioni riservate. > Ogni altro uso del messaggio è vietato. Se avete ricevuto questa e-mail > per errore, siete pregati > di cancellare l'originale e comunicarcelo immediatamente via e-mail > all'indirizzo info@atcult.it > > To 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=rMHBYJxltpLGOjLLPGwGH2D5fNwinyXw > -- Zeno Tajoli System Librarian @CULT Srl Via Quintino Sella, 33 - 00187 Roma Tel +39 06 89873504 - Fax +39 06 89873496 zeno.tajoli@atcult.it www.atcult.it Questo messaggio è destinato alle sole persone indicate e può contenere informazioni riservate. Ogni altro uso del messaggio è vietato. Se avete ricevuto questa e-mail per errore, siete pregati di cancellare l'originale e comunicarcelo immediatamente via e-mail all'indirizzo info@atcult.it