To run an ETL process, you can chain the steps methods in the desired execution order and then call the run
method:
$etl->extract(/* ... */)
->transform(/* ... */)
->load(/* ... */)
->run();
To return the resulting data as an iterator (ex.: Chaining ETL's usecase), you may use the toIterator
method:
$iterator = $etl->extract(/* ... */)
->transform(/* ... */)
->toIterator();
To run the process and return the resulting data as an array, you may use the toArray
method:
$data = $etl->extract(/* ... */)
->transform(/* ... */)
->load(/* ... */)
->toArray();