lib/etl/engine.rb
# Modify the table name if necessary
Modify the table name if necessary
Modify the table name if necessary
def table(table_name, connection)
        if use_temp_tables?
          temp_table_name = "tmp_#{table_name}"
          if temp_tables[temp_table_name].nil?
            begin connection.drop_table(temp_table_name); rescue; end
            connection.copy_table(table_name, temp_table_name)
            temp_tables[temp_table_name] = {
              :table => table_name,
              :connection => connection
            }
          end
          temp_table_name
        else
          table_name
        end
      end
def table ( table_name , connection ) if use_temp_tables? temp_table_name = "tmp_#{table_name}" if temp_tables [ temp_table_name ] . nil? begin connection . drop_table ( temp_table_name ) ; rescue ; end connection . copy_table ( table_name , temp_table_name ) temp_tables [ temp_table_name ] = { :table => table_name , :connection => connection } end temp_table_name else table_name end end
Modify the table name if necessary
Modify the table name if necessary
# Create the temp table and add it to the mapping
table_name
<not_specific>
connection
<not_specific>