Git Product home page Git Product logo

import-engine's People

Contributors

mathielen avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar

import-engine's Issues

Is mapping field keys to arrays possible?

I'm trying to add a mapping as per the original example on ddeboer/data-import

$converter = ...

$converter->addMapping('baz', array('some' => 'else'));

Should the following be possible:

$import = ... 

$import->mappings()
  ->add('baz', array('some' => 'else'));

Notice: Array to string conversion

Notice: Array to string conversion
in 'name' => $this->callable.'',

In fact the variable contains:
$this->callable = ["object", "string"];

Exception trace:
 () at /vendor/mathielen/import-engine/src/Mathielen/ImportEngine/Storage/ServiceStorage.php:78
 Symfony\Component\Debug\ErrorHandler->handleError() at/vendor/mathielen/import-engine/src/Mathielen/ImportEngine/Storage/ServiceStorage.php:80

 Mathielen\ImportEngine\Storage\ServiceStorage->info() at /vendor/mathielen/import-engine/src/Mathielen/ImportEngine/Import/ImportBuilder.php:120

 Mathielen\ImportEngine\Import\ImportBuilder->build() at /vendor/mathielen/import-engine/src/Mathielen/ImportEngine/Import/ImportBuilder.php:103

app/config/config.yml

mathielen_import_engine:
    storageprovider:
        default:
            type: service
            services:
                my_service: ~
    importers:
        minimum_importer:
            target:
                type: file
                uri: "@='%kernel.root_dir%/../output_'~date('Y-m-d')~'.csv'"
                format: csv
$ php ./app/console importengine:import my_service.findAll -i minimum_importer -vvv

xml undefined @attributes

Hi,
I'm trying to use the importer with a XML file, but I get the following error :

[Symfony\Component\Debug\Exception\ContextErrorException]  
  Notice: Undefined index: @attributes                       
                                                             
Exception trace:
 () at [...]vendor/mathielen/import-engine/src/Mathielen/DataImport/Reader/XmlReader.php:36

so the issue seems to be there : https://github.com/mathielen/import-engine/blob/master/src/Mathielen/DataImport/Reader/XmlReader.php#L36 (notice the TODO label :) ), but I can't figure out why it doesn't work.

When I dump the SimpleXMLIterator $this->iterableResult I can see '@attributes' but I can't access them, and in fact even if I could that would only be some attributes on my first xml tag, but it wouldn't return the list of the xml fields .

thanks

Improve docs

For a lib with so many classes, docs are not self-explainatory. I don't know what is the reason and difference, for instance, between using DoctrineStorage and DoctrineQueryStorageProvider? Why should I use one over another? How classes relate to each other? What is the conceptual architecture desing for it? Docs should explain all of these.

Improve code comments

E.g. in constructors comments, no expected var types, no IDE hints etc. at the moment.

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.