Add roundtrip option to command-line CSV import task for better matching when updating in a single system
|Category:||CSV import||Estimated time:||16.00 hours|
|Target version:||Release 2.6.0|
|Google Code Legacy ID:||Tested version:||1.3.1|
This ticket stems from a Groups discussion where a user attempted to export a CSV of descriptions, modified the identifier values in the CSV, and attempted to re-import the CSV back into AtoM.
- Keymap matching is not applicable, and will fail because legacyId in the CSV will be the AtoM information object id and not the original source_id.
- secondary matching on the combination of title, identifier and repo name will fail because the identifier was changed in the CSV.
This change will add new matching logic specifically to support CSV round-tripping:
- Add logic to lib/QubitFlatfileImport.class.php to directly match from legacyId to informationObject.id when a new CLI param is set (--roundtrip).
- This feature will be available on the CLI only.
- When --roundtrip is set, display a warning like the upgrade-sql warning indicating to the user they should only use this if it's actually a round trip, and that they have made a DB backup beforehand.
- Allow a 'force-silent' option to suppress this warning in case it needs to be scripted.
- Update the AtoM docs to include this feature and provide some detail on how matching works, and when each type of matching is used.
- When --roundtrip is set, do not attempt keymap matching or secondary title, identifier, reponame matching - only match legacyId to info obj id.
- Do not create a keymap record when --roundtrip is set.
- Audit log should reflect this record update when the CSV is loaded (e.g. "description was updated").
- Ensure CSV records that are still unmatched even when using --roundtrip are not imported.
#8 Updated by Dan Gillean 10 months ago
- Project changed from AtoM Wishlist to Access to Memory (AtoM)
- Subject changed from CSV import roundtrip feature to Add roundtrip option to command-line CSV import task for better matching when updating in a single system
- Category set to CSV import
- Target version set to Release 2.6.0
- Estimated time changed from 40.00 to 16.00
- Requires documentation set to Yes
Moving this to main AtoM project now that we've implemented it for the CLI, so we remember to test and document it. Updated the title to reflect the fact that this is not yet supported in the UI.
#9 Updated by Dan Gillean 7 months ago
- Status changed from QA/Review to Verified
- % Done changed from 0 to 100
- Requires documentation deleted (
- Tested version 1.3.1 added
Added to 2.6 AtoM documentation in: https://github.com/artefactual/atom-docs/commit/11ebe2a1165b95cbe9c138f599dff30dc2f432d8