Skip to main content

TopMind ETL converter

Project description

ETL table converter and creator

The Python Toolkit for converting table from one database to another

Databases types

Supported databases. You have to use short name of database short_name:type of database

  • ch:clickhouse
  • pg:postgresql
  • mysql:mysql
  • vertica:vertica
  • exasol:exasol

Supported database conversions

  • mysql to pg
  • mysql to vertica
  • mysql to exasol
  • ch to vertica
  • pg to vertica

Credentials

sql_credentials = {
        "pg": {
            "type": "pg",
            "database": os.getenv("PG_DATABASE"),
            "schema": os.getenv("PG_SCHEMA"),
            "user": os.getenv("PG_USER"),
            "host": os.getenv("PG_HOST"),
            "port": os.getenv("PG_PORT"),
            "password": os.getenv("PG_PASSWORD")
        },
        "ch": {
            "type": "ch",
            "database": os.getenv("CH_DATABASE"),
            "user": os.getenv("CH_USER"),
            "host": os.getenv("CH_HOST"),
            "port": os.getenv("CH_PORT"),
            "password": os.getenv("CH_PASSWORD")
        },
        "vertica": {
            "type": "vertica",
            "database": os.getenv("VERTICA_DATABASE"),
            "schema": os.getenv("VERTICA_SCHEMA"),
            "user": os.getenv("VERTICA_USER"),
            "host": os.getenv("VERTICA_HOST"),
            "port": os.getenv("VERTICA_PORT"),
            "password": os.getenv("VERTICA_PASSWORD")
        },
        "mysql": {
            "type": "mysql",
            "database": os.getenv("MYSQL_DATABASE"),
            "user": os.getenv("MYSQL_USER"),
            "host": os.getenv("MYSQL_HOST"),
            "port": os.getenv("MYSQL_PORT"),
            "password": os.getenv("MYSQL_PASSWORD")
        },
    }

Usage

pip3 install etl-converter-talenttech
import os
from converter.fields_converter import FieldsConverter


from_db = "mysql"
to_db = "pg"
converter = FieldsConverter(sql_credentials, from_db, to_db)
tables = [
    "directions",
    "users"
]
print(converter.create_list_of_tables(tables, to_create=False, dir=None))

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

etl-converter-talenttech-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file etl-converter-talenttech-0.0.2.tar.gz.

File metadata

  • Download URL: etl-converter-talenttech-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/3.6.11

File hashes

Hashes for etl-converter-talenttech-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ebb2d825bf5affe85aac7171a9aa4ad61dd1d0f747c8d45e33b4131f34b553e8
MD5 b694548721f4dcf590662db1c04c24ae
BLAKE2b-256 885ba98b8873f767bc6b3edcf94ca640d651469264ed96a15713c92e544afdc9

See more details on using hashes here.

File details

Details for the file etl_converter_talenttech-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: etl_converter_talenttech-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/3.6.11

File hashes

Hashes for etl_converter_talenttech-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 11b99d7cb34a90986e58b0e4e493de59f847ff22d5d7b096c3efcbf63ebcbe5a
MD5 bf79c7f4cbb8a627d493c893d4a7822f
BLAKE2b-256 fa2ee30105b612fe47853961bc4a9f81df266c2a517844cd93bc7da21efee22f

See more details on using hashes here.

Supported by

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