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 have a question about DataImporters: After changing stuff in the csv files (images, localiz
Hello! I have a question about DataImporters: After changing stuff in the csv files (images, localized attributes, etc.), these changes are not reflected in Yves in our current project. So far I resorted to fire publish events manually (i. e. with DataImporterPublisher::addEvent
). Is this the correct default behavior or am I missing some configuration?
Comments
-
you run the dataimportpublisher trigger events at some point?
0 -
No. Do I have to do that? I mean I am using the default importers (for example
data:import:product-abstract
, and when I change an attribute, this is not synced with Yves). I could of course add code to every data importer where this problem occurs, but it feels like this is either a bug or Iβm doing something wrong0 -
You always have to trigger an event in order to get publish&sync done. F.e.
vendor/bin/console publish:trigger-events -r product_concrete -i 5
triggers the sync for element with that ID. Other way is to save to product in Backoffice. After the trigger you will see multiple new messages in Rabbit. So urls, searchkey etc. will be updated0 -
Ah okay, didnβt know that. Is there an easy way to see which entities were actually changed during the import? Right now I compare the csv content manually with whatβs in the database, which is expensive with thousands of products. The csv files contain all data (not just the changes)
0 -
Some entities have βupdatedAtβ columns. You can also get changes on the sql level but this is more expert level. You can use multiple entities in the trigger event and let the system manage the changes. Go and check the deployment.yml files. It helped me a lot understanding the import steps
0 -
Thank you, I think Iβll use the updatedAt columns to see which localized_attributes entries in the db where changed during import and publish the corresponding products. The sql level would be nice though, since all statements are wrapped in a transaction it should theoretically be possible to see which entities were changed. Maybe the touch facade has something to do with it as well? Difficult topic.
0 -
For triggering the event run DataImporterPublisher::triggerEvents() after your import process and the every event you added there before will be released. This is so you can add them add any point and trigger them in one bulk action.
0 -
Yes I know, the problem was that events were not automatically added for the entities that were changed during import. So I had to manually determine which entity was updated and use ::addEvent to add events
0 -
The Importer will for example find Product by SKU and modify it. At this point, you know the Id and add the event, depending on if you have a isModified or isNew to true ob your product entity.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 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
- 26 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
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random