Skip to main content

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:

  1. Automatic configuration of migration scenarios with flexible configuration;
  2. Support for manual configuration, configuring transformations using SQL queries, JinjaSQL (DBT-like) support;
  3. Data migration by nesting levels of the data schema (parallel processing, patch migration, mass dump to JSON files);
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secateur-0.2.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secateur-0.2.3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

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

Hashes for secateur-0.2.3.tar.gz
Algorithm Hash digest
SHA256 c4fe43006ff8ac74ea48075f3b6223431b99a0d0f13a3d921191da60bea3d957
MD5 1f12333b4a867bd7cb315fe98daee922
BLAKE2b-256 8632cd272c8211071a441793abeb73ba55b94173b7bdd0f40dae68ed1796f8d5

See more details on using hashes here.

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

Hashes for secateur-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 133ee09bfb1879713b3911e1898f997d1298618328996fc5875d7ec70f760534
MD5 bc1729060b73adb13b394cb673514ac1
BLAKE2b-256 adb53e11003fbbf3b255185295a9c6af15ec7a9a7e3d889c0c037e099fa7237a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page