Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/remram44/sqlalchemy-copy
- Owner: remram44
- Created: 2022-11-01T15:39:49.000Z (about 2 years ago)
- Default Branch: trunk
- Last Pushed: 2022-11-02T19:28:35.000Z (about 2 years ago)
- Last Synced: 2024-10-11T07:33:15.989Z (about 1 month ago)
- Language: Python
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 / 72Copying 'emails_table'
0 / 123
100 / 123
123 / 123
```