Define ETL pipelines to extract, transform, and load data from one source to another.
composer require ralphschindler/etl-pipeliner
To build an ETL pipeline you need the ETL, an Extractor, a Loader and an Executor.
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());
}
}
$executor = new \EtlPipeliner\EtlExecutor();
$executor->execute(new MyEtlObject());
The Laravel extractor and loader currently support:
- Mysql
- SQL Server
- Postgres