Giter Site home page Giter Site logo

php-etl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-etl's Issues

[RFC] TransformerChain

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.

Add some Examples

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.

bin/pimple-etl config.sample.php fails

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).

[RFC] Semantic fluent interface

$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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.