Custom Process
This example shows the usage of Custom process
name | income |
John |
$50,000 |
Marry |
$60,000 |
Peter |
$100,000 |
Donald |
$80,000 |
->pipe(new Custom(function($row){
$row["income"] = $row["income"] + 1000;
return $row;
}))
name | income |
John |
$51,000 |
Marry |
$61,000 |
Peter |
$101,000 |
Donald |
$81,000 |
The example demonstrates usage of `Custom` process. The Custom process take a function as argument. In this custom function, you can do anything with the data row before return it to data stream.
__Note:__ If you don't return row in custom function, the process will dismiss that row from data stream. You can use this feature as a filtering process if you want to allow some rows and remove others base on your conditions.