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 all, How do we define importers order ? so let’s say I have a data importer X the needs data
hello all,
How do we define importers order ? so let’s say I have a data importer X the needs data from a tabel that will be populated by another importer Y. In this case importer Y has to be executed before importer X.
How do we define this order? I tried to place the command in the needed order in ConsoleDependencyProvider.php but this does not seem to help? Any other suggestions ?
Thanks
Comments
-
Run specific importers in needed order instead of running import of everything?
0 -
hmmm ok
0 -
is there an easier solution?
0 -
You can run imports separatley (
vendor/bin/console data:import:*
)We wrote our own importer script. In our scenario we only need some imports daily (products, prices, images, stock etc.). There's no need to run not required imports over and over again (like customer data)
0 -
I see
0 -
thank you guys
0 -
I think more reliable approach would be:
insert things into queue with importer1
consume the events from importer1 by importer2, then do something about the elements that needs action0 -
in that case you could run those 2 any time you want, because importer2 would pick up anything it can find and do something about it
0 -
U can define the order of importer direct in DataImportBusinessFactory (for the importer developed on project level) and for the importer defined and registered as plugin u have to do like the category
[new CategoryDataImportPlugin(), DataImportConfig::IMPORT_TYPE_CATEGORY_TEMPLATE],
(as array and the second entry of array means that the import type category need to be ordered after the category template, because it need category template before.U can see the order logic here ->
vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataImporterCollection.php:76
On our Project we defined an extra ordering list (list of import type) and we order all data importer directly in the business factory at the end of this function
src/Pyz/Zed/DataImport/Business/DataImportBusinessFactory.php:332
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 73 Spryker News
- 911 Developer Corner
- 771 Spryker Development
- 87 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 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
- 69 Spryker Safari Questions
- 50 Random