Project

ethel

0.0
No commit activity in last 3 years
No release in over 3 years
Ethel is an ORM-agnostic library of ETL (extract-transform-load) utilities
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Ethel

Ethel is an ETL data management tool for Ruby.

Installation

Add this line to your application's Gemfile:

gem 'ethel'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ethel

Usage

Ethel has three main components: readers, operations, and writers. Readers read from a data source, operations transform the data, and writers output the transformed data into a different form. A set of instructions to convert a dataset is called a migration.

Reader and writer modules are logically organized into adapters. Ethel has two built-in adapters: CSV and memory. The CSV adapter provides input and output of delimited text files. The memory adapter is a thin wrapper on top of regular Ruby objects. Additional adapters can be implemented as separate libraries.

There are a few operations available:

  • add/remove/rename/select fields
  • cast
  • merge
  • update

Example:

require 'ethel'

read_options = {:type => 'csv', :file => 'foo.csv'}
write_options = {:type => 'csv', :file => 'bar.csv'}
Ethel.migrate(read_options, write_options) do |m|
  m.cast('foo', :integer)
  m.cast('bar', :string)
  m.update('baz') do |row|
    row['qux'] * 5
  end
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request