Bug #13369

Feature #13280: Create relationships between existing authority records via CSV import

CLI CSV import of example authority record with the example relationships file fails with a "Unknown relationship type" error.

Added by Peter Van Garderen 4 months ago. Updated 4 months ago.

Status:VerifiedStart date:06/27/2020
Priority:HighDue date:
Assignee:Peter Van Garderen% Done:

0%

Category:CSV import
Target version:Release 2.6.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:No

Description

The relationship type used in the Example file (bundled with the code at "lib/task/import/example/authority_records/") is "is controlled by". This is a default relation type in the Actor Relation taxonomy so it should be a "known relationship type".

NOTE: That the same example file imports successfully when you use the CSV GUI import for authority record relationships. It also works when you just do a CLI import task of the relationship CSV file on its own (e.g. "php symfony csv:authority-relation-import")

It is only failing on a CLI import that tries to combine an authority record CSV import with a authority record relationship CSV import at the same time, eg:

php symfony csv:authority-import lib/task/import/example/authority_records/example_authority_records.csv --relation-file=lib/task/import/example/authority_records/example_authority_record_relationships.csv

Note also that the 2.5 documentation says you should separate the authority record CSV file name from the relationship CSV file name with a "\" character. However, when you run this command:

php symfony csv:authority-import lib/task/import/example/authority_records/example_authority_records.csv \ --relation-file=lib/task/import/example/authority_records/example_authority_record_relationships.csv

it results in a different failure:
The execution of task "csv:authority-import" failed.                                                                                                                                                                                
- Too many arguments ("csv:authority-import lib/task/import/example/authority_records/example_authority_records.csv  --relation-file=lib/task/import/example/authority_records/example_authority_record_relationships.csv" given).  

That's resolved by removing the "\" character, but then you get the "Unknown relationship type" error.

History

#1 Updated by Dan Gillean 4 months ago

Yeah, sorry - ignore the 2.5 docs with the slash error. I ran into this issue myself recently and realized that the current suggestions no longer works as expected. I meant to push a small fix to update the syntax but never got to it - and now we're rewriting them all anyways. But the main issue on this ticket still needs addressing, from the sounds of it.

#2 Updated by Peter Van Garderen 4 months ago

  • Assignee changed from Mike Cantelon to Peter Van Garderen
  • Requires documentation set to Yes

Fixed by removing the option. See https://github.com/artefactual/atom/commit/f2403d1289b9b4bed87d7663384780df0cb87400

Needs corresponding docs update.

#4 Updated by Peter Van Garderen 4 months ago

  • Requires documentation changed from Yes to No

#5 Updated by Peter Van Garderen 4 months ago

  • Status changed from New to Verified

Also available in: Atom PDF