Skip to content

rongfengliang/gitbase2postgresql

Repository files navigation

use Singer tap-mysql migrate data to postgresql

how to running

use python3 venv

  • pg venv
mkdir pg
python3 -m venv .
  • gitbase mysql venv
mkdir gitbase
python3 -m venv
  • install tap && target
pg target

cd pg  && source bin/activate && pip install target-postgres

mysql tap: use my change code

cd gitbase && git clone https://github.com/rongfengliang/tap-mysql.git

&& source bin/activate && pip install -e tap-mysql

  • start demo server

gitbase && postgresql use docker-compose

docker-compose up -d
  • simple blobs table migrate
./gitbase/bin/tap-mysql -c mysql-tap.json --catalog p.json | ./pg/bin/target-postgres -c pg-target.json
  • for all gitbase table migrate 2 pg
./gitbase/bin/tap-mysql -c mysql-tap.json -p gitbase.json | ./pg/bin/target-postgres -c pg-target.json

some notes

for better data stora you can create new schema in pg database with below

create schema gitbase

and change pg target with below

{
    "host": "localhost",
    "port": 5432,
    "dbname": "postgres",
    "user": "postgres",
    "password": "dalong",
    "schema": "gitbase"
}

About

use singer etl convert gitbase 2 postgresql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published