The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to encode all apostrophes when exporting CSV file
Best Answers
-
kayman Member Posts: 662 UnicornIn order to add an escape character you'll need to use the replace operator. So before you send your data to the export CSV operator add a replace operator and replace ' with \'
Now, it's a really weird problem, as Rapidminer kind of deals with this out of the box already, and I've never had any issues with this. Also writing a file to the desired folder has never been an issue either, just adding the full path (like C:/tmp/dump_me_here.csv) always works for me.
I sometimes have issues with linebreaks, but that's the nature of CSV, nothing to do with rapidminer so I typically export as excel to avoid these issues.
Have you tried to export to excel? This may not be the format you want but at least you could verify it works that way so we can exclude already some scenario's.
If you don't mind sharing your process and (limited part) of your data (export process as rmp and attach, same for any sample test data) we can support better.5 -
EL75 Member Posts: 43 Contributor IIHi Kayman,
You are definitely right
1 - regarding the export, I've solved the problem. The origin of the issue was that I've added - after the "write CSV operator - a "split data" operator to divise my file in 4 parts, but I've connected the 4 outputs outputs directly to a "store" operator, the connected to the result ports... I've forgotten to add again a "write CSV" operator after each "split data". Sorry for wasting your time, thanks for your patience.
2- regarding the character [ ' ], you're solution works well
you're the master !
Wish you the best.
2
Answers
Now, these should not disappear in the first place I think, so you might also try to tweak the settings of your export (like untick 'quote nominal values') as this may interfere with your content also
could you tell me where I could do this ? I use the "replace" operator, and I tried different ways using \' but that doesn't work.
I also untick the 'quote nominal values' without more success.
By the way, I'm getting mad searching a way of exporting results (CSV file that is the output of the process "write CSV") in a folder on my computer in order to open it with excel. The operator write and store the file in my rapid miner repository...
thanks again for your help, hope you'll save me from there..