Skip to content
Dan Leehr edited this page Jul 15, 2013 · 13 revisions

Data Import

TraitDB is designed to load data from CSV files. The format of the CSV files shall be defined by a YAML template. There are some additional rules to the CSV data.

CSV Rules

  • CSV files must be UTF-8 encoded. The ruby CSV library requires this.
  • The first row of the CSV file must contain the column names, and they must be unique.
  • Subsequent rows of the CSV file must contain data.
  • The templates dictate the allowable values in each cell. If a cell value does not meet the requirements (e.g. text data in a numeric field), the row will be ignored. The import process will warn and provide specific feedback on this,

YAML Templates

TraitDB requires a YAML template to parse and load CSV files. Since these templates describe the data formats, they should be authored by the users/maintainers of the TraitDB installation. Templates can be uploaded by admin users.

Clone this wiki locally