About the format of JSON in files - 2 Zeno Tajoli (19 Jun 2019 15:26 EDT)
Re: About the format of JSON in files - 2 Theodor Tolstoy (19 Jun 2019 15:34 EDT)
Re: About the format of JSON in files - 2 Zeno Tajoli (20 Jun 2019 04:02 EDT)
Re: About the format of JSON in files - 2 Wayne Schneider (20 Jun 2019 15:14 EDT)
Re: About the format of JSON in files - 2 Zeno Tajoli (21 Jun 2019 06:50 EDT)

Re: About the format of JSON in files - 2 Zeno Tajoli 21 Jun 2019 06:50 EDT

Hi to all,

for me is a good new that I don't need to create the metadata property.

Thank you very much
Zeno Tajoli

Il 20/06/2019 21:14, Wayne Schneider ha scritto:
> Hi, Zeno. A couple of comments:
>
> 1) Most FOLIO endpoints do not support posting an array of records, the
> records need to be posted one at a time (at least as of now). How your
> files need to be formatted also depends on the tool that you are using
> to load the data. If you are using a tool such as Jon Miller's data
> loading tool, you need to create your files in the format that tool expects.
> 2) I notice in your example that you are including the "metadata"
> property. I believe this is meant to be generated by the server when the
> record is loaded.
>
> I hope this helps!
>
>     wayne
> --
> Wayne Schneider
> Software Engineer
> www.indexdata.com <http://www.indexdata.com>
>
> On Thu, Jun 20, 2019 at 3:02 AM Zeno Tajoli <zeno.tajoli@atcult.it
> <mailto:zeno.tajoli@atcult.it>> wrote:
>
>     Hi Theodor,
>
>
>     Il 19/06/2019 21:34, Theodor Tolstoy ha scritto:
>      > Hi Zeno!
>      > The format of the JSON depends on the end goal. What endpoint do you
>      > intend to hit?
>
>     in fact now I'm thinking on a generic way, I need to do a data
>     migration
>     from a previous ILS.
>     So I'm seeking a general way to format JSON files with many records.
>     For example I have to migrate 200,000 user.
>     I clearly can't create 200,000 files, I'm thinking to create 4
>     different
>     files with 50,000 records inside.
>
>     An example of my structure inside files for manual blocks,
>     see
>     https://github.com/jemiller0/Folio/blob/master/FolioLibrary/Block.json:
>
>     [{
>         "type" : "Manual",
>         "desc" : "Blocco globale che deriva da sospensione UOL",
>         "expirationDate" : "9999-12-31T23:59:00Z",
>         "borrowing" : true,
>         "renewals" : true,
>         "requests" : true,
>         "metadata" : {
>           "createdDate" : "2019-06-19T21:19:43Z",
>           "reatedByUserId" : "c4b5e97a-0a99-4db9-97df-4fdf406ec74c",
>           "createdByUsernamee" : "importer",
>           "updatedDate" : "2019-06-19T21:19:43Z",
>           "updatedByUserId" : "c4b5e97a-0a99-4db9-97df-4fdf406ec74c",
>           "updatedByUsername" : "importer"
>         },
>         "userId" : "117a078b-de9e-452d-bca5-29ea6da700fd",
>         "id" : "2863639e-3a07-4854-a048-82aa595749d6"
>     }, {
>     ....
>     }, {
>         "type" : "Manual",
>         "desc" : "Blocco globale che deriva da sospensione UOL",
>         "staffInformation" : "rest rit",
>         "expirationDate" : "2019-05-16T23:59:00Z",
>         "borrowing" : true,
>         "renewals" : true,
>         "requests" : true,
>         "metadata" : {
>           "createdDate" : "2019-06-19T21:19:43Z",
>           "reatedByUserId" : "c4b5e97a-0a99-4db9-97df-4fdf406ec74c",
>           "createdByUsernamee" : "importer",
>           "updatedDate" : "2019-06-19T21:19:43Z",
>           "updatedByUserId" : "c4b5e97a-0a99-4db9-97df-4fdf406ec74c",
>           "updatedByUsername" : "importer"
>         },
>         "userId" : "b5bdd5d1-1a74-47b4-94a8-ba640f69b051",
>         "id" : "6c68b5d2-67e1-4ec3-ad7f-4a58decc3605"
>     }]
>
>
>     Is it correct ?
>     Or is better something like:
>     {
>         "manualblocks": [
>              {
>              ....
>              }, {
>               ...
>               }
>         ],
>         "totalRecords": 2
>     }
>     as you can see from here:
>     https://github.com/folio-org/mod-feesfines/blob/master/ramls/examples/manualblock_collection.sample
>
>     Bye
>     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 <mailto:zeno.tajoli@atcult.it>
>
>     www.atcult.it <http://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 <mailto:info@atcult.it>
>
>     ------------------------------------------------------
>     You received this message because you are subscribed to OLE Mailing List
>     "sysops-sig".
>     To unsubscribe from this list and stop receiving emails from it, follow
>     this link: http://archives.simplelists.com.
>     To post to this group, send email to
>     sysops-sig@ole-lists.openlibraryfoundation.org
>     <mailto:sysops-sig@ole-lists.openlibraryfoundation.org>
>     <mailto:sysops-sig@ole-lists.openlibraryfoundation.org
>     <mailto:sysops-sig@ole-lists.openlibraryfoundation.org>>.
>     Visit this group at
>     https://ole-lists.openlibraryfoundation.org<https://ole-lists.openlibraryfoundation.org>
>     .
>
> ------------------------------------------------------
> You received this message because you are subscribed to OLE Mailing List
> "sysops-sig".
> To unsubscribe from this list and stop receiving emails from it, follow
> this link:
> http://www.simplelists.com/confirm.php?u=eAsHxmigbxwnHMJjSwEKl3I1lRhNGciO.
> To post to this group, send email to
> sysops-sig@ole-lists.openlibraryfoundation.org
> <mailto:sysops-sig@ole-lists.openlibraryfoundation.org>.
> Visit this group at
> https://ole-lists.openlibraryfoundation.org<https://ole-lists.openlibraryfoundation.org>
> .
>

--
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