User Manual: CSV Importer: Import Templates

Templates for helping organize your data for import can be obtained in two ways: via the CollectionSpace GitHub repository (recommended) or by using the CollectionSpace search results export (ad hoc reporting) feature. 

They key element of the templates is the column headers. The column headers in your spreadsheet need to match the field names found in the CollectionSpace database. These are not the same field names that you see in the user interface; for example, Other number > Value in the UI is numberValue in the database.

We recommend you use templates downloaded from the GitHub repository. These templates have every field in a given procedure or authority, along with information about the correct type of data to put in each field. Most importantly, they indicate the allowed values for fields controlled by a static term list/optionlist, which may be different from how you see those terms displayed in the user interface. Finally, for fields that can be populated from multiple authorities, you will see all the possible fields in the order that they will be processed (see this issue for why that matters).

Templates generated via search results export are more “quick and dirty,” and will have only the column headers that you select when Exporting. For fields that can be populated from multiple authorities, depending on the data in the selected records, you may not get all possible columns in your template. The columns may not appear in the order they will be processed.

You do not need to know how to code or use advanced features of Github to retrieve templates from our repository. Step-by-step point-and-click instructions are given below.

Via the CollectionSpace GitHub repository: https://github.com/collectionspace/cspace-config-untangler/tree/main/data/templates.

  1. To access the template, first click on the correct category, then the correct release number, then the name of your profile. If you’re not sure what release/profile you’re on, you can check the bottom right corner of your login screen. The community_profiles category contains a set of templates for each domain profile maintained by the community. If LYRASIS hosts your CollectionSpace instance and we have customized your instance, custom templates for you will be under lyrasis_hosted_profiles. Templates for any other profiles that have been generated on request will be under other_profiles.

  2. A list of all templates available for your profile will be shown. See the “Template names in GitHub section below” for help interpreting the template names.

  3. Click on the template you want to download.

  4. Click on the “Raw” button.

  5. Do “File > Save” (CTRL-s) to save the .csv file to a location on your computer where you will be able to find it later.

  6. Open the file using the instructions at https://collectionspace.atlassian.net/wiki/spaces/COL/pages/2681634817

  1. Click this link to download the entire GitHub repository as a .zip file

  2. Decompress the .zip file using your favorite method

  3. You can keep the whole repository folder, but it contains far more information than you need. This is not necessarily a problem, but you will need to navigate from the expanded folder → data → templates → {your category} → {your version} → {your profile} each time you want to access templates. (See previous section for info on category/version/profile)

    OR, you can find your templates folder by navigating the path above, copy that folder to another location on your computer, and delete the repository folder and .zip file.

Most of the templates in the GitHub repository are named for procedures or authorities, e.g.:

  • core_7-0-0_acquisition-template.csv is for the Acquisition Procedure

  • core_7-0-0_collectionobject-template.csv is for Object (Cataloging) Procedure

  • core_7-0-0_concept-template.csv is for the Concept Authority

Templates for creating relationships are as follows:

  • core_7-0-0_authorityhierarchy-template.csv is for creating hierarchies among existing authority terms, for example:

    • North America

      • Canada

      • US

      • Mexico

    • Main Storage Room

      • Aisle 1

        • Shelf 1

  • core_7-0-0_nonhierarchicalrelationships-template.xls is for creating relationships among existing procedural records, for example:

    • Relationships between Objects and Media Handling Records

    • Relationships between Acquisitions and Objects

    • Relationships between Loans and Condition Checks

  • core_7-0-0_objecthierarchy-template.xls is for creating relationships among existing Object records, for example:

    • 2000.001.0001a-b, pair of shoes

      • 2000.001.0001a, left shoe

      • 2000.001.0001b, right shoe

    • 2000.001.0002.1-.2, pair of portraits

      • 2000.001.0002.1, portrait one

      • 2000.001.0002.1, portrait two

  1. To create a template, login to your instance of CollectionSpace and search for any record of the type you’d like to import. (Or create some test records with the kind of data you are planning to import, and do a search for those).

  2. Using the checkboxes, select one or more records from the search results list, and then click on the Export button.

  3. Select the fields you’d like to include in your template from the dropdown.

  4. Click on the Export button and Save your file locally.