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.6.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.6-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metaworkflows-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 732cb784d811b444da9a32509d31c1ac540b548d893d54e914e170b815476c2e
MD5 6e3bfd2fc901a8cddedeb6c2f360dc27
BLAKE2b-256 d08623d117e7376fa478a960fc7cc000fd069b96550b92453267f745ce2d9fa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaworkflows-0.1.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: metaworkflows-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0421d9c42c7f72ff08c7c8c3ded93c19529b79b60fc50f4524a25298efbafc
MD5 699c2c4ffc9d4bca72f53d079aebb34a
BLAKE2b-256 7c8324bef7a8cbc0b938cf2d0a3c219233bf0fb52de78380817ab6a80b7627ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for metaworkflows-0.1.6-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