Git Product home page Git Product logo

simplymigrate's Introduction

SimplyMigrate

Build Status codecov

Utility to migrate data from one database to other.

How to use

  • Run following commands to build jar
  • ./gradlew clean jar
  • Find jar from build/libs directory.

Features

Migrate data with minimal configuration

SimplyMigrate requires following configuration to start working on your source and sink databases.

config.yaml

migration:
  source:
    database: SQLITE3
    host: /Users/dineshsawant/testsource.db
    userId:
    password:
  target:
    database: MYSQL
    host: 127.0.0.1
    port: 3306
    userId: root

Then run following command:

java -jar simplymigrate.jar --configFile=./test-config.yaml --sourceTable=birthdays --targetTable=test.birthdays --partitionKey=id

The above command will copy all records from birthdays table of SQLite database to MySQL database's test.birthdays table. Here partition key can be number or date or datetime type column.

It is fast

SimplyMigrate does not use OFFSET-LIMIT query provided by SQL to fetch data from source database . Because OFFSET-LIMIT query takes more time as the offset value becomes higher.

SimplyMigrate fetches data in ranges by increasing value of partition key. Hence significant performance boost is achieved.

Choose set of records bounded by number or date or datetime fields

Following command will migrate records which have id from 100 to 1000 (inclusive).

java -jar simplymigrate.jar --configFile=./test-config.yaml --sourceTable=birthdays --targetTable=test.birthdays --partitionKey=id --boundBy=id --lower=100 --upper=1000

Following command will migrate records which have birthday from 1040-1-1 to 1940-1-1 (inclusive).

java -jar simplymigrate.jar --configFile=./test-config.yaml --sourceTable=birthdays --targetTable=test.birthdays --partitionKey=id --boundBy=birthday --lower=1040-1-1 --upper=1940-1-1

Supported databases

  • MYSQL
  • SQLITE3

simplymigrate's People

Contributors

dinsaw avatar

Watchers

 avatar  avatar  avatar

Forkers

nadirhamid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.