Undoing a .csv import

62 views
Skip to first unread message

Oakham School Archives

unread,
Jun 24, 2021, 9:25:17 AM6/24/21
to AtoM Users
Hi everyone,

I was just experimenting with .csv imports but now I want to delete what I have imported. Is there any way to undo the .csv import action or a way to select and then delete multiple files at a time?

Many thanks 

Charlotte

Dan Gillean

unread,
Jun 24, 2021, 12:15:40 PM6/24/21
to ICA-AtoM Users
Hi Charlotte, 

Unfortunately I don't think AtoM currently has exactly what you're looking for - there's no way via the user interface to make a bulk selection of records and delete them all at once. There are a few things that might help however, particularly if you have access to the command-line. 

First, deletions in AtoM will apply to descendant records - so if during your testing, you imported a fonds with hundreds of lower-level record (subfonds, series, subseries, files, items, etc), deleting that fonds level record will also delete any lower-level records that are attached to it. 

An important note about this, that will also apply to the other options I list below, however: deleting a description will NOT automatically delete other entity records that might be attached to that description. For example, if your import included a new subject access point, then deleting the fonds will not also delete the subject access point from the Subjects taxonomy - it will just delete the relationship between the two. The same is true for other entity types (e.g. authority records, accession records, physical storage locations, Places/Genres/other terms, archival institution records, etc). There are a few exceptions such as digital objects and Rights statements, since these are appended directly to the description - but even then, a Rights statement might be deleted, but an associated Rightsholder record would not (since that Rightsholder might also be in use elsewhere). 

There are a couple of command-line tasks that might help if you have access. 

For example, if all the descriptions you want to keep are published, then you could use the following task to delete all draft descriptions: 
Similarly, there is this task - it can delete a description from the command-line when provided with a slug, but it also has the option to delete all descriptions associated with a particular archival institution: 
Finally, we're aware that importing a CSV that leads to unexpected or unwanted outcomes is a difficult problem, and we're considering long term fixes for this. The first step, which will be coming in our 2.7 release, will be to help users better evaluate their CSVs BEFORE importing, to avoid common errors. Consequently, AtoM 2.7 will include a command-line task that will validate your description CSVs, and it will also include support in the user interface for running this. Administrators can also set whether or not this check will be run on all imports before they are performed, with 3 configuration options: 
  • Off - no checks are run before imports
  • Permissive - warnings will be ignored; only issues that will cause errors will stop the CSV from importing
  • Strict - both warnings and errors will prevent the CSV from importing
Relevant issue tickets: 
Additionally, while we are looking for more comprehensive long-term solutions that will allow for full rollback support, 2.7 will also include a command-line task that can undo the creation of descriptions resulting from a CSV import. Like the existing tasks, this will NOT automatically delete other entities that might have been created (such as authority records, terms, repository records, etc). Additionally, the task has a chance of failing if it is not run shortly after the import. However, it's a start, and one we hope to improve upon in future releases. See: 
Finally: if this is a test environment and you are happy to delete ALL data, there is a command-line task that will completely purge your AtoM instance of data. See: 
I hope that some of these suggestions might help, even if they're not exactly what you're looking for! 

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/3d2dd60e-f5f6-4d84-8117-d2d7cdcd0ad3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages