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 guys, When implementing a queue importer, I am getting this exception: `Exception - Exception

U048WDEP3R7
U048WDEP3R7 Posts: 217 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello guys,
When implementing a queue importer, I am getting this exception:

Exception - Exception: Writer is not defined.

Any clue?

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Your importer extends directly or indirectly the DataImporterDataSetWriterAware which means you need to call setDataSetWriter in the DataImportBusinessFactory where you create your importer.

    An example can be found at \Pyz\Zed\DataImport\Business\DataImportBusinessFactory::createProductImageImporter (see https://github.com/spryker-shop/b2b-demo-shop/blob/8c21e264eb4318b6605465762c2ea00[…]0/src/Pyz/Zed/DataImport/Business/DataImportBusinessFactory.php)

  • U048WDEP3R7
    U048WDEP3R7 Posts: 217 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks again. It works after seeing this code. Another quick question, when an import fails, do we have logs about the failure?

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Not by default, you can run the import with --vvv for more output or with -t to stop in case of an exception.
    The reporting capabilities of the importers are not that good, we have extended those in almost every project we did so far to get more information/reporting

  • U048WDEP3R7
    U048WDEP3R7 Posts: 217 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thanks you that helps πŸ™‚