Project

converge

0.0
No commit activity in last 3 years
No release in over 3 years
Data merger
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 1
~> 10.0

Runtime

 Project Readme

Gem Version Build Status Code Climate Coverage Status Dependency Status

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.