Great - keep me posted! Raw ideas again, but what I've been doing at some point in my tests was traversing ObjectSpace to get all the subclasses of ActiveWarehouse::Fact or Dimension, and assign them table_name = "tmp_" + table_name (unless the table_name already begins with "tmp_", which can happen if you include a "common.rb" in each of your control files then call this method to ensure every AR in scope is properly "temporised").
Basically I think that unless specified otherwise, when use_temp_tables is called with true, we could handle the AR patching behind. If you find this (or something similar) interesting and not too much black-magic, I could work on a patch (I will do it for myself anyway when you'll have fixed the temp table functionality). Still on this topic, here's a use case which I'd like to improve: use_temp_tables # use a variable for further reference table = "date_dimension" ... destination :table => table # (handles temp table mapping alone as I seem to remember) # this won't work because the table is not translated to the temp table screen(:fatal) do connection.query("select distinct customer_type from #{table}") end Basically, I think we'd just need a small helper which would do : def table_name(table_name) use_temp_tables? ? "tmp_#{table_name}" : table_name end (that's the idea, not the implementation) to allow a more seamless use in the screen. Now all this is just polishing - but I think it brings value. Thibaut _______________________________________________ Activewarehouse-discuss mailing list Activewarehouse-discuss@rubyforge.org http://rubyforge.org/mailman/listinfo/activewarehouse-discuss