Converge
Data merger for relational databases.
Installation
Add this line to your application's Gemfile:
gem 'converge'
And then execute:
$ bundle
Or install it yourself as:
$ gem install converge
Usage
Unless you are a database developer, you will want to use one of several Converge adapters for your particular database:
PostgreSQL - Converge-PG Redshift - Converge-RS
If your database isn't listed above. Please feel free to hack together an adapter, and let me know about it. :-)
require 'converge'
config = {
columns: %w{id name address},
target_name: "my_table",
staging_name "my_staging_table"
}
orm_model = MyModel
connection = Converge::Pg::Connection.new(orm_model.connection)
model = Converge::Model.new(config, orm_model)
staging_table = Converge::DB::Table::Staging.new(model)
target_table = Converge::DB::Table::Target.new(model)
merger = Converge::DB::Table::Merger.new(staging_table, connection)
merger.merge(target_table)
API Documentation
See RubyDoc
Contributors
See Contributing for details.
License
©2015 Ed Carrel. Released under the MIT License.
See License for details.