OnlyColumn Process
Keep selected columns and discard the rest
name | income | age |
John |
50,000 |
25 |
Marry |
60,000 |
30 |
Peter |
100,000 |
45 |
Donald |
80,000 |
40 |
->pipe(new OnlyColumn(array(
"age", "income"
)))
age | income |
25 |
50,000 |
30 |
60,000 |
45 |
100,000 |
40 |
80,000 |
Sometime you may want to simplify your data flow by taking only some of columns to continue in datapipe. You can do so with OnlyColumn process. This process will act like a filter which only let some specified columns passing through. Other columns will be discarded.
__Sample code__
```
->pipe(new OnlyColumn(array(
"age", "income"
)))
```