CSV export - command line - a single archival description and its child records

30 views
Skip to first unread message

cher...@ualberta.ca

unread,
Nov 2, 2023, 1:54:20 PM11/2/23
to AtoM Users
Hello Community,

Does anyone have experience bulk exporting archival descriptions via CLI specifying a particular archival description and exporting all its child records? What criteria would I have to add to the command:
php symfony csv:export --criteria="i18n.title in('Title of the fonds')" /path/to/my/export-location/example.csv

Since there is a --current-level-only option, I assumed the above command would export the top level description AND all its child records, but it exports ONLY the description the tile of which is listed.

We use AtoM 2.7. We have descriptions with hundreds of child records, so exporting them via GUI using clipboard is not ideal or even practical. 

I will appreciate any help.

Thank you,
Maryna Chernyavska
Digital Archivist
University of Alberta Archives

Dan Gillean

unread,
Nov 2, 2023, 2:33:29 PM11/2/23
to ica-ato...@googlegroups.com
Hi Maryna, 

Instead of trying to use the --criteria option (which is essentially passing raw SQL to the task, and therefore bypassing normal features like inheritance when given a title), have you tried using the --single-slug option instead? Per the documentation: 

The --single-slug option can be used to to target a single archival unit (e.g. fonds, collection, etc) for export, if you know the slug of the target description.


If I recall my AtoM history correctly, the --curent-level-only option was added as a way to limit the behavior of this --single-slug option, which WILL use inheritance and export descendant records by default. 

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/a12417fb-0b0f-4948-9a47-90a1cfbaef05n%40googlegroups.com.

Maryna Chernyavska

unread,
Nov 2, 2023, 2:45:17 PM11/2/23
to ica-ato...@googlegroups.com
Hi Dan,

Thanks for this additional background information. Silly me - I assumed that if providing a title of an archival description results in the export of that description only, the --single-slug option would do the same. I've just tried using the --single-slug, and it does exactly what I need. Thanks for the quick response!

Cheers,
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/aLNAdfgJ_9k/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/CAC1FhZ%2B-8MbPsCqk%2BdyDP9tg-Of0-nvy-xCqwbLOfBMsa771tQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages