Sha256: 074543dba444015080fbdcd14acf487943b6aadab9eb855199c2ff23d2f95730
Contents?: true
Size: 750 Bytes
Versions: 4
Compression:
Stored size: 750 Bytes
Contents
source :in, { :file => 'data/delimited.txt', :parser => { :name => :csv } }, [ :first_name, :last_name, :ssn, :age, :sex ] #transform :age, :type, :type => :number transform :ssn, :sha1 transform(:ssn){ |n, v, row| v[0,24] } transform :sex, :decode, {:decode_table_path => 'data/decode.txt'} destination :out, { :type => :update_database, :target => :data_warehouse, :database => 'etl_unittest', :table => 'people' }, { :conditions => [{:field => "\#{conn.quote_column_name(:id)}", :value => "\#{conn.quote(row[:id])}", :comp => "="}], :order => [:id, :first_name, :last_name, :ssn, :age, :sex, :test, :calc_test], :virtual => { :id => :surrogate_key, :test => "test!", :calc_test => Time.now }, }
Version data entries
4 entries across 4 versions & 3 rubygems