What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello, i try to find a a way to connect the middleware to the import logic for classic Product Data
Hello,
i try to find a a way to connect the middleware to the import logic for classic Product Data import. The doc seems a bit outdated here https://documentation.spryker.com/v4/docs/spryker-middleware
So lets imagine my data already passed the middleware and gets flushed() at the end of the pipeline with the WriteStream
… in the WriteStream
there is another Writer
injected which has a write(array $data)
method … this Writer
should do basically the same as the DataImport would do. So the next step i was looking for is to connect the DataImporter logic via its corresponding facade, but it seems that you cannot connect to that that easy. Looking at the DataImportFacade
there is only an import()
function which accepts only a DataImporterConfigurationTransfer
which is just meant to read from a file by itself (when running data:import command)…
Looking at the documentation for the middleware (see link) you can see, that in the MyModuleBusinessFactory
there will be all the steps that should be in my opinion still be hidden in the importer and not be done again in some other modules BusinessFactory … so is this a kind of design flaw at this place or do i miss something? For me this looks like violating the DRY principle since there is already the importer module doing the same stuff.
I would expect that with the importFacade
you could do something like import(DataSetInterface $dataset)
instead of passing a configuration … any ideas here? Any other solutions?
Best
Comments
-
Okay, i see there was an change to this 9 months ago https://github.com/spryker/data-import-extension/releases
I think this addressed exactly the issue i got here with an unwanted dependency to the import module. so instead of managing the import process again in the middleware flow, it is now solved via a plugin which can be called from the spryker dataimport module itself and externally from the middleware for example
0 -
So the outcome of this issue is: Update the documentation in https://documentation.spryker.com/v4/docs/spryker-middleware to match the “new way” 🙂
0 -
Hi Ingo, thank you for the feedback! I forwarded it internally and will set the reminder to myself to re-check after my vacation that it's not got lost.
0 -
Won't. Thank you for the input, Ingo. If you find something wrong with our documentation in the future, you can always propose changes here: https://documentation.spryker.com/docs/about-documentation#contributing-to-the-documentation
0 -
One additional question to this topic. It would be good if somebody could show me how to use the
DataSetItemWriterPluginInterface
at the one hand for connecting the middleware and at the other hand also for the normal spryker data import. The goal is to write one import logic to handle both cases with one implementation. Best0 -
Hey Ingo. Queue Data Importer is based on
DataSetItemWriterPluginInterface
and difference betweenDataSetItemWriterPluginInterface
the oldDataSetWriterPluginInterface
is that the new one accepts transfer as itswrite()
method argument instead ofDataSetInterface
instance. Our Devs suggested this ressource for some examples: Does this help you? https://documentation.spryker.com/docs/importing-data-with-queue-data-importer0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random