User Manual: CSV Importer: Import Templates

Templates for helping organize your data for import can be generated 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, Brief Description in the UI is briefDescription in the database.

Templates generated via the GitHub repository have every field in a given procedure or authority, along with information about the correct type of data to put in each field. Templates generated via the Export feature are more “quick and dirty,” and will have only the column headers that you select when Exporting.

Via the CollectionSpace GitHub repository: https://github.com/collectionspace/cspace-config-untangler/tree/main/data/templates. You do not need to know how to use GitHub to generate a data import template.

  1. To access the template, first click on 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.

  2. A list of all templates available for your profile will be shown. 

  3. To move the template from GitHub to the spreadsheet program of your choice, click on the Raw button, select all (CTRL-A) from the resulting page, and copy it to your clipboard (CTRL-C).

    1. In Open Office, open a new spreadsheet, click on cell 1A, and paste the data (CTRL-V). If the data is all in one column on the left:

      1. Click on the letter A to select the entire column

      2. Go to the Data menu and select Text to Columns

      3. Under Separation options, select the Separated by radio button and click the checkbox next to Comma

      4. Select OK

    2. In Excel, open a new spreadsheet, click on cell 1A, and paste the data (CTRL-V). If the data is all in one column on the left:

      1. Click on the letter A to select the entire column

      2. Go to the Data Menu, and select Text to Columns 

      3. In the Text Wizard, select the Delimited radio button

      4. Click Next

      5. Select Comma as your Delimiter

      6. Click Finish

    3. In Google Sheets, create a new spreadsheet, click on cell 1A, and paste the data (CTRL-V). If the data is all in one column on the left:

      1. Click on the letter A to select the entire column

      2. Go to the Data Menu and select Split text to columns

  4. The correct column headers will be located in Row 7 of your spreadsheet.

  5. Tip: Save the template locally after going through this process so you don’t have to do it every time you use the tool. Be sure to check the release notes for new releases, we’ll always note any schema changes that would require an update to your template.

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

    • Relationships among Procedures can be 1:1 or 1:many (e.g. one Acquisition to many Objects)

  • 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.

  2. Using the checkboxes, select a record 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.