leomarquine / php-etl

Extract, Transform and Load data using PHP.
MIT License
178 stars 81 forks source link

Resolving ETL from Laravel's IoC Container makes nonfunctioning instance #22

Closed jimmypuckett closed 3 years ago

jimmypuckett commented 5 years ago

When I manually make an ETL instance

(new Marquine\Etl\Etl)->extract('csv', './file.csv')->transform('rename_columns', ['columns' => ['email_address' => 'email']])->toArray()

I get...

[
     [
       "id" => "1",
       "name" => "Name 1",
       "email" => "email@1.com",
     ],
     //...
]

but when use the IoC...

app(Marquine\Etl\Etl::class)->extract('csv', './file.csv')->transform('rename_columns', ['columns' => ['email_address' => 'email']])->toArray()

I get an error...

InvalidArgumentException with message 'The step [csv] is not a valid extractor.'
ecourtial commented 4 years ago

Hi @jimmypuckett if you want, we forked the library here and we fixed some issues and added some features. The changelog is available here. Our objective is to keep this great library alive. If you find any bug or want to contribute to keep the package alive, do not hesitate!