Hi, replying to myself, in case it's useful to someone else - here's the solution I came up with: http://gist.github.com/39191.
I refactored a bit the way etl_execution migrations are handled, so I can add custom migrations to the etl_execution database (copy this in environment.rb): ETL::Execution::Migration.register_migration do |connection| connection.create_table :geocoded_addresses do |t| t.column :adresse, :string t.column :latitude, :float t.column :longitude, :float end end ETL::Execution::Migration.migrate The matching model is a regular AR model except that I tell it to use the etl_execution database: class GeocodedAddress < ActiveRecord::Base establish_connection :etl_execution end cheers, -- Thibaut On Fri, Dec 19, 2008 at 5:20 PM, Thibaut Barrère <thibaut.barr...@gmail.com>wrote: > Hello, > Sharing a few thoughts here, I'd love to have your opinion. > > I have a datawarehouse that is rebuild totally from scratch each night (as > opposed to incrementally) - basically drop database, db:migrate, then > import. Works pretty well. > > For an evolution, I'd like to keep some unimportant state (geocoding cache) > into a database so it can be reused each night (and completed if relevant). > Loosing the cache would not be a problem if it happened, we would just > rebuild it. > > Are some of you using the etl_execution database for storing that kind of > things, as I'm thinking of doing it ? > > I'm thinking about using an AR record, like: > > class CachedAddress < ActiveRecord::Base > establish_connection :etl_execution > end > > I would probably define an additional migration for that as well (like the > ones built-in for :jobs,:records and :batches) by patching > ETL::Execution::Migration migrate. > > what do you think ? > > thanks, > > Thibaut Barrère > -- > LoGeek > [blog] http://evolvingworker.com - tools for a better day > [blog] http://blog.logeek.fr - about writing software >
_______________________________________________ Activewarehouse-discuss mailing list Activewarehouse-discuss@rubyforge.org http://rubyforge.org/mailman/listinfo/activewarehouse-discuss