CSV export - command line - level of description as a criterium

48 views
Skip to first unread message

cher...@ualberta.ca

unread,
Apr 21, 2023, 5:18:53 PM4/21/23
to AtoM Users
Hello everyone,

I would like to do a csv export of archival descriptions. AtoM documentation provides clear instructions on how to do it: 
php symfony csv:export /path/to/my/export-location/example.csv

I was wondering whether I can specify a level of description using the --criteria option, e.g. collections only, or fonds only, or series only. Does anyone know how to do it?

Thanks in advance!
Maryna

Dan Gillean

unread,
Apr 24, 2023, 8:43:06 AM4/24/23
to ica-ato...@googlegroups.com
Hi Maryna, 

While there is admittedly a known bug with this feature in the 2.7.1 release (which has already been addressed internally - see #13659), there is already a way to do this via the user interface that might be much simpler. See step 6 in this section: 
This method uses PHP code to handle the criteria (keeping it much simpler), and also includes some basic protections so you don't export a CSV that cannot be reimported (in that if you want to export a descendant level, then all ancestor levels above it must also be included, so no records are orphaned without their parents). 

Doing this via the criteria option on the command-line would involve a number of joins across both the term (for Levels of description) and object tables (for object IDs etc)  - meaning it may be rather complex to craft, and somewhat fragile. It's certainly beyond my own meagre skills to construct, unfortunately. 

I am wondering if you might meet your needs by either using the functionality supported via the user interface, and/or exporting all records and then sorting by level of description in a spreadsheet application (like LibreOffice Calc, etc) afterwards, deleting the rows with levels you don't want? If no, perhaps you can tell us more about your use case?

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/b2becd46-7431-4812-9b01-29d0a0d26bedn%40googlegroups.com.

Maryna Chernyavska

unread,
Apr 24, 2023, 10:09:35 AM4/24/23
to ica-ato...@googlegroups.com
Hi Dan,

Thank you very much for your reply - always greatly appreciated!

I certainly considered exporting all archival descriptions and then filtering them, but thought that perhaps there's a more elegant solution. 

Unfortunately, the UI option is not very practical in our case, as there are 6,000+ descriptions that I need to export. In case this is of interest, all of these are a special in-house-created type of archival description without any descendants but some are top level descriptions, while others are nested within a fonds or collection.

I'll just export all the descriptions and go from there. It seems to be the easiest solution.

Best wishes,
Maryna


You received this message because you are subscribed to a topic in the Google Groups "AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/n1pzjjnvh1c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/CAC1FhZKrq7bSAUhKYJsZnzDn-ouvvsDwMdJqbhJ_0LS_4BJKLQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages