export - Delta exporting data in a rails app? -


i need implement delta export functionality existing rails app. delta export means data gets exported once. e.g. export data today, when export again tomorrow, new data after last export exported.

is there gem or nice solution this?

my approach far store time of last export somewhere , export new data after last export time. however, creating table 1 single field , row seems bit weird me.

any ideas?

i table so:

create_table :data_exports |t|   t.datetime :exported_at end 

with corresponding dataexport model.

then make rake task

a) exports records required tables, condition where(["updated_at > ?", dataexport.last.exported_at])

b) dataexport.create(:exported_at => time.now)


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -