Import Data

Important: Importing records into the database should be handled by a knowledgeable and skilled staff member. Please carefully read the instructions below.

The Import Data page allows system administrators to import resource records or controlled vocabularies from a text file. This data can be from another Metavus site or anywhere else, as long as the data is in the correct format.

The required format for import is a file containing tab separated fields with each record terminated by a newline character. Any line containing a newline character within any field will cause the import to be terminated on that record. The first line of the import file must contain a list of tab separated database field names as defined in the Metadata Field Editor.

Controlled vocabularies -- The first line of the file must give the name of the field. All other lines give terms to create, one per line.

Example:

Format
HTML
DOCX
PPTX
PDF

Resource records -- If the header line contains a Title field, then resource records will be imported. Each line of the import file will be matched against existing records using the Unique Field selected below or Title + Description if no Unique Field is selected. In the latter case, every row of the file must contain values in the Title and Description columns. When no existing record matches the unique value, a new one will be created.

Multiple values for controlled names, classifications, or option fields for a resource record must be provided on separate lines. Each record will have a number of lines corresponding to the maximum number of terms in any vocabulary assigned to that record.

Once the records have been imported, both the search and recommender databases must be rebuilt so that searching and the recommender system will work correctly.

Example (to be used with "Title" selected as Unique Field):

Title	Format	Subject
Record One	HTML	Biology
Record One	PDF
Record Two	HTML	Physics
Record Three	HTML	Chemistry
Record Three	PPTX
Record Three	DOCX

Important considerations when importing resource records are:

DisplayFormTable(); ?>