Last Updated: February 25, 2016
·
683
· fsproru

petl - Pretty good ETL framework

1. Install it as a gem

$ gem install petl

2. Write your ETL

require 'petl'

module ETL::Example
  extend Petl
  extend self

  def extract
    # Grab all data from source(s) here.
    # Preferably return an array of hashes.
  end

  def transform rows
    # Manipulate the data extracted by the previous extract method.
  end

  def load rows
    # Load the transformed data here into the destination(s).
  end

  def source_count
    # Count the number of records from your source(s).
  end

  def destination_count
    # Same as #source_count but with your destination(s).
  end
end

3. Run it!

ETL::Example.perform

Info

https://github.com/ZestFinance/petl