PHP code example of ralphschindler / etl-pipeliner
1. Go to this page and download the library: Download ralphschindler/etl-pipeliner library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ralphschindler / etl-pipeliner example snippets
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());