Add support for command-line bulk authority record CSV export task (including relations and aliases)
|Category:||CSV export||Estimated time:||28.00 hours|
|Target version:||Release 2.6.0|
|Google Code Legacy ID:||Tested version:||2.6|
AtoM supports bulk CSV export of authority records via the user interface, using the clipboard. However, no equivalent command-line task currently exists. This enhancement will add a new command-line CSV export task for authority records. When alias and/or relations data is present in the exported authority records, this data will be included in the export as well in the additional CSV templates.
#6 Updated by Dan Gillean 7 months ago
- File aliases.csv added
- File authorities.csv added
- File relations.csv added
- Status changed from QA/Review to Feedback
- Assignee set to Mike Cantelon
As far as I can tell, the export is working. However, I really wanted to test roundtripping them. I noticed for example that relations appear in the CSV twice - once for each direction - and wanted to confirm this wouldn't lead to duplicate entries on re-import. Unfortunately, my import consistently fails.
I'm attaching the files I was using for testing. The command I have run to import them was:
php symfony csv:authority-import --alias-file=/vagrant/aliases.csv --relation-file=/vagrant/relations.csv /vagrant/authorities.csv
The import error I get is:
Could not find "Family" in type of entity terms array.
I've confirmed that the term exists in AtoM in both the actor entity type, and the actor relation type taxonomies. I even created new (duplicate) terms just in case, but the error persists - not sure why.
It's separate from this issue, but if an entity type is missing, AtoM should ideally make a note in the console log and then create the term and continue with the import.
In the meantime, can anyone see a reason why I can't roundtrip these records? They were exported using the new task described here.
#7 Updated by Dan Gillean 7 months ago
Ok, ignore the above - there were apparently Finnish rows in the master authority record CSV, and that was causing the import error. If I remove them, everything imports as expected.
However, my theory appears to be correct - right now, on import each relationship is being created twice, because in the export CSV, the relation file lists each relation two times - one for each entity.
#11 Updated by Dan Gillean about 1 month ago
- % Done changed from 0 to 100
- Requires documentation deleted (
- Tested version 2.6 added
Docs added to 2.6 branch in https://github.com/artefactual/atom-docs/commit/a2184c6f84d9a442d949da12ef5ade84688d423a