ralphschindler / etl-pipeliner
Installs: 48 333
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: ^7.0|^8.0
This package is auto-updated.
Last update: 2024-10-29 05:22:47 UTC
README
Define ETL pipelines to extract, transform, and load data from one source to another.
Installation
composer require ralphschindler/etl-pipeliner
Usage
To build an ETL pipeline you need the ETL, an Extractor, a Loader and an Executor.
ETL object
Implement a class extending \EtlPipeliner\AbstractEtl
. This package ships with an extractor and a loader for use within Laravel application.
class MyEtlObject extends \EtlPipeline\AbstractEtl { public function extractor(): \EtlPipeliner\AbstractExtractor { return new \EtlPipeliner\Laravel\DbExtractor(app('db')->connection()); } public function transform(array $data) { return $data; } public function loader(): \EtlPipeliner\AbstractLoader { return new \EtlPipeliner\Laravel\DbLoader(app('db')->connection()); } }
Execute the ETL
$executor = new \EtlPipeliner\EtlExecutor(); $executor->execute(new MyEtlObject());
Database support
The Laravel extractor and loader currently support:
- Mysql
- SQL Server
- Postgres