docteurklein / php-etl Goto Github PK
View Code? Open in Web Editor NEWExtract-Transform-Load library
License: MIT License
Extract-Transform-Load library
License: MIT License
New idea.
TransformerChain
which implements TransformerInterface
. It accepts collection of transformers in the constructor and iterates over them and calls transform()
on each of them.
Hi,
i really like this library, but it's hard to understand how it's working if you see it for the first time.
Ok, there is the /bin folder and the config.sample, but it woud be really cool to have some standard use cases in the Readme.
Hi !
Is there any good reason to force $data
to be an array in TransformerInterface ?
https://github.com/docteurklein/php-etl/blob/master/src/Knp/ETL/TransformerInterface.php#L17
@docteurklein Does this makes sense to you?
Called in DBALLoader on ContextInterface
.
Waiting for PR ;)
It is in readme, and it fails:
$ bin/pimple-etl config.sample.php
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(csv/users.csv): failed to open stream: No such file or directory' in src/Knp/ETL/Extractor/CsvExtractor.php:29
Stack trace:
#0 src/Knp/ETL/Extractor/CsvExtractor.php(29): SplFileObject->__construct('/home/umpirsky/...')
#1 config.sample.php(36): Knp\ETL\Extractor\CsvExtractor->__construct('/home/umpirsky/...', ';', '"', 0)
#2 vendor/pimple/pimple/src/Pimple/Container.php(113): {closure}(Object(Pimple\Container))
#3 bin/pimple-etl(17): Pimple\Container->offsetGet('e')
#4 {main}
thrown in src/Knp/ETL/Extractor/CsvExtractor.php on line 29
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(csv/users.csv): failed to open stream: No such file or directory' in src/Knp/ETL/Extractor/CsvExtractor.php on line 29
RuntimeException: SplFileObject::__construct(csv/users.csv): failed to open stream: No such file or directory in src/Knp/ETL/Extractor/CsvExtractor.php on line 29
Call Stack:
0.0030 638128 1. {main}() bin/pimple-etl:0
0.0047 971928 2. Pimple\Container->offsetGet() bin/pimple-etl:17
0.0047 971960 3. {closure:config.sample.php:36-36}() vendor/pimple/pimple/src/Pimple/Container.php:113
0.0050 1002152 4. Knp\ETL\Extractor\CsvExtractor->__construct() config.sample.php:36
0.0050 1006568 5. SplFileObject->__construct() src/Knp/ETL/Extractor/CsvExtractor.php:29
Not very user friendly.
I suggest adding user entity and csv to fixtures and make it work by default.
Or providing some more basic example like suggested in #24 (comment).
$etl = new Knp\Etl();
$etl
->extract('from.csv')
->transform(function(array $data) {
return array_change_key_case($data)
})
->load('to.json')
;
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.