wizacode/php-etl

CSV extractor header option

Nicolas-Masson-Wizaplace opened this issue · 1 comments

For headless CSV data. ex.:

1;John;Doe;john.doe@acme.com
2;Jane;Does;jane.does@acme.com
3;Bart;Simpson;el-barto@acme.com

Add an header option to the Csv extractor class

(
    new Etl()
)
->extract(
    new Csv(),
    "/path/to/csv.file",
    [
        'delimiter' => ';',
        'headers' => [
            'id',
            'name',
            'surname',
            'email'
        ]
    ]
)

ah nevermind there is already a way to do this with the columns options