mathielen / import-engine Goto Github PK
View Code? Open in Web Editor NEWFull-blown importer stack for importing almost any data into your application
License: MIT License
Full-blown importer stack for importing almost any data into your application
License: MIT License
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
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
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
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.
/vendor/mathielen/import-engine/src/Mathielen/ImportEngine/Storage/Provider/ServiceStorageProvider.php:41
is_callable($callable) return false
because:
var_dump(array_keys($callable));
array(3) { [0]=> int(0) [1]=> int(1) [2]=> int(2) }
It is necessary
unset($callable[2]);
E.g. in constructors comments, no expected var types, no IDE hints etc. at the moment.
resolveQueries() should parse DQL-Strings to QueryBuilder
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.