Download PDF Version

Flat File Import Guide

The Flat File Import feature is accessed from eReserve > Readings > Import > Flat File Archive

The flat file import option in readings management
Figure 1: Flat File Import

Purpose of this document

This document provides details on how to use the function for Library and Support Staff. Should you require additional assistance please do not hesitate to contact the eReserve Support Team at support@ereserve.com.au and a technical representative will contact you to assist. When contacting eReserve Support, please provide the Flat File Import email confirmation to help us troubleshoot any issues you may be experiencing.

Types of Flat File Import

The Flat File Import function is primarily used for importing data from legacy systems into eReserve Plus. There are 3 types of data imports:

  • Courses: Create a set of Courses or Subjects to match the Learning Management System in eReserve Plus using the Course Import

  • Readings: Core resource records within eReserve Plus are called Readings. This import enables the creation of the metadata and upload of files to Cloud Storage. The import definition for Readings is strict and requires that data meets the eReserve validation rules for each kind of Reading (i.e. Books, Journal Articles, Websites etc)

  • Requests: The Requests import definition enables the creation of Readings, Requests and Reading Lists in one process.

Pre-requisites

There are a number of pre-requisites required before attempting a flat file import of data. These are outlined for each type of import, however all imports rely on the following setup:

  1. Schools: The list of Schools will already need to have been configured. To check whether Schools are implemented, visit Configuration > Schools

  2. File Preparation: The Flat File Import function provides a single mechanism to import data and resources however a different set of files must be prepared for each type of import. Understanding the file preparation of the import folder - called the Archive in eReserve Plus - will ensure data can be ingested more easily. Each import will have its own Archive folder setup which is explained in further detail for each type of import. The Archive folder may consist of at least 2 of 3 files/folders:

A Data File: This is a CSV file in a UTF-8 file format. Filename = import_records.csv

and

A Mapping File: This is a YML file which references the data to map it to the correct fields. Filename = csv_to_document_mapping.yml

and (optionally)

A Resource Folder: Is a folder which should contain any physical files (e.g. PDFs, MGPs, JPGs etc) referenced in the Data File. All resources should be saved into the Resources folder with each file saved with its reference in the Data File. e.g. thedish.pdf

A figure displaying the contents of an Archived Zip file
Figure 2: Archived Contents

Please Note: The filenames in the archive zip must be named exactly as outlined above for the single import mechanism to recognise them.

All Archive folders will include at least one CSV file. CSV files come with some caveats:

a. UTF-8 is the file format to be used with eReserve Plus, otherwise import issues may occur. If assistance is required for converting the CSV file to UTF-8 format.

b. Microsoft Excel has auto-formatting feature and may cause formatting problems with a CSV file. For example a page number is seen to be a date where the value of the field will be automatically formatted to look like a date. To avoid these issues consider using http://www.libreoffice.org as an alternative means to edit CSV files.

c. Ensure there are no line returns in column data in the CSV file. There should only be line returns at the end of each row.

d. Double quotes are used by eReserve Plus for text columns. Please ensure that single quotes are used throughout all column data.

e. All column titles will need to be in lower case format for the Flat File Import to be successful.

f. If a mandatory field is required you must provide a value. If a field is not mandatory, you can leave it blank.

Row Reference

The column __ref_id__ can be added to either of the Flat File Imports, as an optional column, which can be used to assign a reference number to all resources in a flat file.

New Column within Flat File Import
Figure 3: New Column within Flat File Import
This reference number is displayed next to the row number in an Import Complete email when an error occurs.

Ref ID is referenced in the details within email
Figure 4: Ref ID within email

The __ref_id__ provides a consistent method of referring to a resource in a flat file. It remains the same for each resource allowing you to easily refer back to resources after amendments to your flat file. This is particularly useful when import large numbers of resources.