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
-
Clone the repository:
git clone <your-repo-url> cd metaworkflows
-
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure connections: Copy
config/connections.yaml.exampletoconfig/connections.yamland 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metaworkflows-0.1.2.tar.gz.
File metadata
- Download URL: metaworkflows-0.1.2.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e38b1f58d4cb103f02f3602c1c70da022f72b3961e81e169f81339ff963c41b2
|
|
| MD5 |
c72f1efd64f54c1d3fb963520313570d
|
|
| BLAKE2b-256 |
377a204c6f3d58c25ca29feaae7af28aeee5c41737174c1ce346af510131ab10
|
File details
Details for the file metaworkflows-0.1.2-py3-none-any.whl.
File metadata
- Download URL: metaworkflows-0.1.2-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
290051b8e8d1008ba7aeda8ba51be17b3ed7599625df731a87c86bbc0fddd469
|
|
| MD5 |
de210d62f0caf970150da7a3dac764c8
|
|
| BLAKE2b-256 |
4971d4fa263ca5840dfef2963bfdc7ef505c137c8a571c84c18cb9750a23d3cf
|