Skip to main content

A metadata-driven ETL framework

Project description

metaworkflows: A Metadata-Driven ETL Framework

metaworkflows is a Python-based framework for building robust and extensible ETL pipelines. It leverages YAML configuration files to define ETL jobs, allowing for a clear separation of logic and configuration.

Features

  • Metadata-Driven: Define ETL jobs, sources, sinks, and transformations in YAML.
  • Extensible Engine Support: Currently supports Python scripts and Apache Spark. Easily extendable to other engines (e.g., Flink).
  • Versatile I/O: Connect to various databases (PostgreSQL, MySQL, etc.) and object storage services (Google Cloud Storage, AWS S3, etc.).
  • SOLID Design: Built with SOLID principles in mind for maintainability and scalability.
  • Spark SQL Transformations: Define Spark transformations using SQL.
  • Configurable Spark: Specify Spark configurations directly in your job YAML.

Project Structure

metaworkflows/
├── README.md
├── setup.py
├── .gitignore
├── requirements.txt
├── config/
│ ├── connections.yaml.example # Example connection configurations
│ ├── connections.yaml # User-specific connection configurations
│ └── logging.conf
├── metaworkflows/ # Source code directory
│ ├── **init**.py # Makes 'metaworkflows' a package
│ ├── main.py # CLI entry point
│ ├── core/
│ │ ├── **init**.py
│ │ ├── job.py
│ │ └── pipeline.py
│ ├── engines/
│ │ ├── **init**.py
│ │ ├── base.py
│ │ ├── python_engine.py
│ │ ├── spark_engine.py
│ │ └── flink_engine.py # Placeholder for Flink
│ ├── io/
│ │ ├── **init**.py
│ │ ├── base.py
│ │ ├── database.py
│ │ ├── file.py
│ │ ├── object_storage.py
│ │ ├── postgres_database.py
│ │ └── gcp_object_storage.py
│ └── transformers/
│ ├── **init**.py
│ ├── base.py
│ └── sql.py
└── tests/
├── **init**.py
├── test_config.py
├── test_engines.py
└── test_io.py

Setup

  1. Clone the repository:

    git clone <your-repo-url>
    cd metaworkflows
    
  2. Create a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Configure connections: Copy config/connections.yaml.example to config/connections.yaml and update with your database and storage credentials.

Usage

To run an ETL job via the command line:

python -m metaworkflows.main run_job --job-path jobs/etl/your_job.yaml

Or programmatically:

from metaworkflows.core.pipeline import Pipeline
from metaworkflows.core.job import Job

# Ensure your current working directory is the project root
job_definition = Job.from_yaml("jobs/etl/spark_job.yaml")
pipeline = Pipeline(job_definition)
pipeline.run()

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

metaworkflows-0.1.5.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

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

metaworkflows-0.1.5-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file metaworkflows-0.1.5.tar.gz.

File metadata

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

File hashes

Hashes for metaworkflows-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cdd2744aadbe595c1ae8e97756fd767cb72a9b5972330ee86274d23e27e7dc21
MD5 0be5023efd6920ef41cd8a633490b81d
BLAKE2b-256 6f8e663a76e812b71949593de76abc20d0f1f61a9a569c21d38f249e9ce827e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaworkflows-0.1.5.tar.gz:

Publisher: python-publish.yml on anhtuanluu/meta_workflows

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

File details

Details for the file metaworkflows-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: metaworkflows-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for metaworkflows-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5fce3251621a3dfc8e69c946a0fe3dd3ea1ab61573824d7ac6fd5ef186c39805
MD5 bb5156af31cc31c63be9937d5b26396e
BLAKE2b-256 ad6867346e90db6d22c99ff7b1158afb9c0a790d8e1db1f75d3e27dddf0f3637

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaworkflows-0.1.5-py3-none-any.whl:

Publisher: python-publish.yml on anhtuanluu/meta_workflows

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