A framework for migrating relational databases to document-oriented databases
Project description
Secateur
A framework for migrating relational databases to document-oriented databases
Introduction
Secateur is a tool for migrating data from relational databases to document-oriented ones. It provides the ability to transfer data to the target storage, preserving the hierarchical structure of the data and modifying it to a new model representation. The key functions are:
- Automatic configuration of migration scenarios with flexible configuration;
- Support for manual configuration, configuring transformations using SQL queries, JinjaSQL (DBT-like) support;
- Data migration by nesting levels of the data schema (parallel processing, patch migration, mass dump to JSON files);
- Pruning of target storage documents, combining them depending on the types of relationships (one-to-one, one-to-many, many-to-one, many-to-many).
Supported DBMS
Relational
PostgreSQL ...
Documentary
MongoDB
Toolkits used:
sqlalchemy pymongo jinja2
Documentation
Latest documentation is at:
Installation / Requirements
pip install secateur
Usage example
from secateur import Secateur
secateur = Secateur(
"postgresql://user:password@localhost:5495/database",
"mongodb://localhost:27017", mongo_database="db_name"
)
secateur.auto_config(schemes=['public'])
secateur["collection_1"] = secateur.from_query("SELECT date, SUM(price) FROM mart.orders GROUP BY date")
secateur.save_config()
secateur.backup(auto=True)
secateur.migrate(batch_size=500)
secateur.prune()
secateur.close()
License
Secateur is distributed under the MIT license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secateur-0.2.3.tar.gz.
File metadata
- Download URL: secateur-0.2.3.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fe43006ff8ac74ea48075f3b6223431b99a0d0f13a3d921191da60bea3d957
|
|
| MD5 |
1f12333b4a867bd7cb315fe98daee922
|
|
| BLAKE2b-256 |
8632cd272c8211071a441793abeb73ba55b94173b7bdd0f40dae68ed1796f8d5
|
File details
Details for the file secateur-0.2.3-py3-none-any.whl.
File metadata
- Download URL: secateur-0.2.3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
133ee09bfb1879713b3911e1898f997d1298618328996fc5875d7ec70f760534
|
|
| MD5 |
bc1729060b73adb13b394cb673514ac1
|
|
| BLAKE2b-256 |
adb53e11003fbbf3b255185295a9c6af15ec7a9a7e3d889c0c037e099fa7237a
|