Hi there, I'm pretty new to activewarehouse, and was wondering what techniques are used to add and remove fields from the destination file. Right now it appears I have to delete fields by omitting them from the bulk import section, and add them by either renaming them on the fly or copying them. (Please let me know if this is not what activewarehouse is for :-).
Here's the goal: take a list of employees and their phone numbers, and place each phone number on a different row with a corresponding phone number type like so: original format and sample row: => id, first_name, last_name, phone, fax =>10,ben,tom,4444444,5555555 final format and TWO rows: =>id,number,phone_category =>1,4444444,phone =>2,5555555,fax Notice I removed the first and last name columns...here are the beginnings of a row_processor (clearly written incorrectly or against conventions): def process(row) bp = row[:business_phone] fp = row[:fax_phone] rows = [] biz = {:business_phone => bp, :first_name => 'biz'} fax = {:business_phone => fp, :first_name => 'fax'} rows =[biz,fax] end
_______________________________________________ Activewarehouse-discuss mailing list Activewarehouse-discuss@rubyforge.org http://rubyforge.org/mailman/listinfo/activewarehouse-discuss