Merge Data from getmarc server

Added in version 0.4

This workflow is used to merge data in a tsv file with metadata from a getmarc server.

Prerequisites

In order to perform this workflow, the get_marc_server_url configuration in galatea needs to be set.

To verify that this has been configured, use the config command.

If get_marc_server_url is set, a value will show. If get_marc_server_url is not set, it can be set with config set command.

For example, galatea config set get_marc_server_url https://example.com/ will configure galatea to use a getmarc server at https://example.com/

Workflow

  1. If not using an existing mapping toml file, generate a new one with merge-data from-getmarc init-mapper command.

    user@WORKMACHINE123 % galatea merge-data from-getmarc init-mapper myfile.tsv
    Wrote mapping file to /Users/user/mapping.toml
    
  2. Edit the content of the created mapping toml file in a text editor.

    • Make sure the identifier_key is set to column containing the mmsid in the tsv file.

      [mappings]
      identifier_key = "Bibliographic Identifier"
      
    • For each column expected to have data added to, edit each [[mapping]] section.

      See Mapping Fields section for more details

  3. Merge the data with the merge command

    user@WORKMACHINE123 % galatea merge-data from-getmarc merge myfile.tsv /Users/user/mapping.toml
    

Mapping Fields

key

Description:

Column name in tsv file

Example:

key = "Uniform Title"

matching_marc_fields

Description:

marc fields to use from getmarc record

Example:

matching_marc_fields = ["240$a"]

delimiter

Description:

delimiter characters to use from getmarc record

Example:

delimiter = "||"

existing_data

Description:

What to do if the column in tsv file already has a value.

Valid Values:

  • keep

  • replace

  • append

Example:

existing_data = "keep"