Sha256: df936996db8dac8f60e739a2766c7bd106d175413dcc2236d071ae81343db6ff

Contents?: true

Size: 332 Bytes

Versions: 5

Compression:

Stored size: 332 Bytes

Contents

module Chicago
  module ETL
    module Transformations
      class AddInsertTimestamp
        def initialize(timestamp=Time.now)
          @insert_timestamp = timestamp.utc
        end

        def call(row, errors=[])
          row[:_inserted_at] = @insert_timestamp
          [row, errors]
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chicago-etl-0.0.13 lib/chicago/etl/transformations/add_insert_timestamp.rb
chicago-etl-0.0.12 lib/chicago/etl/transformations/add_insert_timestamp.rb
chicago-etl-0.0.11 lib/chicago/etl/transformations/add_insert_timestamp.rb
chicago-etl-0.0.10 lib/chicago/etl/transformations/add_insert_timestamp.rb
chicago-etl-0.0.9 lib/chicago/etl/transformations/add_insert_timestamp.rb