Skip to main content

This repository is forked from etl-utilities.

Project description

Project Documentation

Table of Contents

  1. Overview
  2. Classes
  3. Logging
  4. Additional Utilities

Overview

This package is a fork of etl-utilities by [@magicjedi90]. Maintained by Eiji. This project provides a comprehensive Data ETL (Extract, Transform, Load) and data manipulation framework using Python. It integrates with databases using SQLAlchemy and provides tools for data parsing, cleaning, loading, validating, and more. The project is structured with classes that encapsulate different functionalities.

Classes

Connector

The Connector class handles creating connections to various types of databases (MSSQL, PostgreSQL, MySQL) using SQLAlchemy. It provides static methods for obtaining both trusted and user connections.

Key Methods:

  • get_mssql_trusted_connection
  • get_mssql_user_connection
  • get_postgres_user_connection
  • get_mysql_user_connection
  • Instance methods for returning database connections based on stored configuration.

Loader

The Loader class is responsible for loading data from a Pandas DataFrame into a database. It manages the insertion process, ensuring data is inserted efficiently and effectively with the use of SQLAlchemy and custom logging.

MySqlLoader

A slight extension of the Loader class specifically for MySQL databases. It provides overrides to manage MySQL-specific data types and query formatting.

MsSqlLoader

A specialized loader for loading data into MSSQL databases with additional functionalities like fast insertions using bulk methods.

Parser

The Parser class consists of a series of static methods dedicated to parsing various data types—boolean, float, date, and integer. These methods are essential for data type conversion and consistency across the application.

Cleaner

The Cleaner class provides methods for sanitizing and formatting data in a DataFrame. It includes functions for setting column name casing conventions, cleaning various types of data, and preparing data for reliable analysis and insertion.

Creator

This class deals with generating SQL CREATE TABLE statements for different databases like MSSQL and MariaDB. The query generation considers data types deduced from DataFrame content.

Analyzer

The Analyzer class assesses DataFrame characteristics and helps identify unique columns, column pairs, empty columns, and more. It aids in generating metadata for data types, which is crucial for creating or validating schemas.

Validator

The Validator class ensures DataFrame compatibility with the target database table structure by checking for extra columns, validating data types, and ensuring that no data truncation will occur during upload.

MsSqlUpdater

A class designed for constructing SQL statements for operations like mergers, updates, inserts, and appends to manage data transitions between tables efficiently.

Logging

The project uses a singleton Logger class with colored output format for console logging. This helps in debugging and understanding the flow by logging messages at various severity levels.

Additional Utilities

  • Parsing and Cleaning Functions: Utility functions for parsing and cleaning various data types.
  • Standardization: A set of utility functions to standardize and clean DataFrame column names and content.

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_utilities_plus-1.0.5.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

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

etl_utilities_plus-1.0.5-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file etl_utilities_plus-1.0.5.tar.gz.

File metadata

  • Download URL: etl_utilities_plus-1.0.5.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for etl_utilities_plus-1.0.5.tar.gz
Algorithm Hash digest
SHA256 488f04014eb59b54bd08e088f4d7a5b56cf4f401f168cd0b8e3980cbd21fafb4
MD5 8fa5a926db012a707e368423b48b4686
BLAKE2b-256 12ed498058825096950b02197f90dceaa1df93e6d605b6e19e42684c1f51b1d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for etl_utilities_plus-1.0.5.tar.gz:

Publisher: publish.yml on ameijin/etl_utilities

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file etl_utilities_plus-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for etl_utilities_plus-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0e8b1541fb60f1c2124efad927f060360219e6e431e651f72dbaa32ab4c9b679
MD5 e2eb4d99ff537d8d10a9538969460ea4
BLAKE2b-256 fd6bb0a28b15c328cfa123828fb5a316fc9dfc5ed3f73edea459505577e4b684

See more details on using hashes here.

Provenance

The following attestation bundles were made for etl_utilities_plus-1.0.5-py3-none-any.whl:

Publisher: publish.yml on ameijin/etl_utilities

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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