Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/remram44/sqlalchemy-copy

Copy data between any databases supported by SQLAlchemy
https://github.com/remram44/sqlalchemy-copy

Last synced: 20 days ago
JSON representation

Copy data between any databases supported by SQLAlchemy

Awesome Lists containing this project

README

        

# sqlalchemy-copy

This is a small script that copies data between any databases supported by SQLalchemy.

Example:

```
# List tables in source database
$ python sqlalchemy_copy.py sqlite:///test.sqlite3
Tables in source:

Table('people')
Column('name', TEXT(), table=, nullable=False)
Column('age', INTEGER(), table=)
Index('idx_people_name', Column('name', TEXT(), table=, nullable=False))

# Copy specific table
$ python sqlalchemy_copy.py --batch-size 50 sqlite:///test.sqlite3 postgresql://postgres:[email protected]/testdb people_table
Copying 'people_table'
0 / 72
50 / 72
72 / 72

# Copy all tables
$ python sqlalchemy_copy.py sqlite:///test.sqlite3 postgresql://postgres:[email protected]/testdb
Copying 'people_table'
0 / 72
72 / 72

Copying 'emails_table'
0 / 123
100 / 123
123 / 123
```