autotelik / datashift_spree

Comprehensive import and export tools for Spree and Spree Products
Other
90 stars 104 forks source link

How to avoid duplicating? #27

Open savrand opened 10 years ago

savrand commented 10 years ago

Running command bundle exec thor datashift_spree:load:products -i path and all is imported to DB perfectly, but with loading again duplicates appear. How can I run the command so that it would update existing products and variants? and added new if they appeared in the file?

autotelik commented 10 years ago

i don't think this is currently an option. there is no smart lookup fo existing entries

my own workflow was always to load in Test, tweak the spreadhseet till happy then do a single upload

to Prod so not been a requirement

Should be fairly simple to add config criteria to ID which fields should be used as the 'primary' key and then during the load stage check whetehr DB entry already exists with those 'primary' fields from the spreadsheet

  cheers tom

albums   : http://aqwan.bandcamp.com all music:http://soundcloud.com/aqwan


From: savrand notifications@github.com To: autotelik/datashift_spree datashift_spree@noreply.github.com Sent: Wednesday, 20 August 2014, 13:03 Subject: [datashift_spree] How to avoid duplicating? (#27)

Running command bundle exec thor datashift_spree:load:products -i path and all is imported to DB perfectly, but with loading again duplicates appear. How can I run the command so that it would update existing products and variants? and added new if they appeared in the file? — Reply to this email directly or view it on GitHub.