Forums › Forums › OroPlatform › OroPlatform – Installation/Technical Issues or Problems › CSV import/export JobConfiguration
This topic contains 6 replies, has 3 voices, and was last updated by Dima Makaruk 6 years, 5 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- September 28, 2017 at 4:31 pm #35416
How is it possible to set csv delimiter to ; for an import job ?
- CreatorTopic
- AuthorReplies
- September 29, 2017 at 7:26 am #35417
Hello Dima
I think you setup a custom delimiter in the batch_jobs.ymlYAML123456789101112131415entity_import_from_csv:title: "Entity Import from CSV"type: importconfiguration:delimiter: ";"steps:import:title: importclass: Oro\Bundle\BatchBundle\Step\ItemStepservices:reader: oro_importexport.reader.csvprocessor: oro_importexport.processor.import_delegatewriter: oro_importexport.writer.entityparameters: ~October 3, 2017 at 10:51 am #35418Hi Orban,
i’ve tried this already.
Unfortunately this does not work.[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized option “configuration” under “connector.jobs.my.job”October 6, 2017 at 2:14 pm #35419Hi Dima,
Looks like it’s not possible to change delimiter via configuration for now.
You can try to override delimiter in your Context
https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/ImportExportBundle/Reader/CsvFileReader.php#L127Also, as I know, options for context can be passed via request:
https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/ImportExportBundle/Controller/ImportExportController.php#L205Hope that this information will help.
October 7, 2017 at 3:11 am #35420Hi ishirko
thank you for your answer.
i’ve it a similar way.
I thought there is more convenient way to configure the import/export.October 10, 2017 at 1:17 pm #35421I’m importing via cli. The Context gets options from the message body. I haven’t found a clean way to set options in the message body.
The PRE_CLI_IMPORT is produced in the command oro:import:file , whereby no options are set in the message body.October 11, 2017 at 12:03 am #35422Another problem is , that the writer in which is used in the PreImportMessageProcessorAbstract cann’t be configured at all.
- AuthorReplies
The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.