seamusabshere / data_miner

Download, unpack from a ZIP/TAR/GZ/BZ2 archive, parse, correct, convert units and import Google Spreadsheets, XLS, ODS, XML, CSV, HTML, etc. into your ActiveRecord models. Uses RemoteTable gem internally.
MIT License
302 stars 21 forks source link

doesn't automatically detect and fill 'raw' columns #2

Closed seamusabshere closed 14 years ago

seamusabshere commented 15 years ago

i think the system should automatically detect and fill raw columns.

to take the Airport example from README.rdoc, Airport#country is a belongs_to association. during the data mine, it is being automatically filled by doing Country.find_by_name(X).

attr.store :country, :field_number => 2, :foreign_key => :name

what if it checked for a :country_raw field and filled that in? you would end up with stuff like

:country => [a real country object representing the US], :country_raw => 'UNITED STATES'

seamusabshere commented 14 years ago

wontfix