Skip to content
tom statter edited this page Jul 18, 2017 · 7 revisions

Datashift supports two styles of csv or excel creation:

  • generate for creating empty templates that represent the columns of your model and associations
  • export, unsurprisingly this one does a full data export.

Generate

Creates a simple Template, containing simply the models description i.e a set of column headings.

You can specify whether to include a model's associations or not.

This is a simple and quick way to see what columns and data requirements a model has, and make a good basis for migrating data from another system. Data can easily be mapped and copied from an external system into the appropriate column in the template. The spreadsheet can then be directly imported into the destination system.

Examples of creating Templates

ruby bundle exec thor datashift:generate:excel --model Spree::User --result spree_user_template.xls

Export

Performs a full export of a models data. You can specify whether to include a model's associations or not.

Clone this wiki locally