'Trying to work around the error DF-CSVWriter-InvalidEscapeSetting

So I have a dataset which I want to export to csv with pipe as separator and no escape character. That dataset contains in fact 4 source columns, 3 regular ones (just text) and one variable one. That last column holds another subset of values that are also separated with a pipe.

Purpose is that the export looks like this, where the values are coming from my 4th field. COL1|COL2|COL3|VAL1|VAL2|VAL3|.... The number of values can be different for each record but.

When I set the csv export separator to ";", I get this result which is expected COL1;COL2;COL3;VAL1|VAL2|VAL3|....

However setting it to "|", it throws the error DF-CSVWriter-InvalidEscapeSetting. Most likely because it detected the separator character in my 4th field and then enforces that an escape character needs to be set. Which is a logical thing in most case but in my case I would like him to ignore this and just export as-is.

Any way how I can work around this, perhaps with a different approach or some additional settings? Split & flatten produces extra rows but that's not what I want.

Regards, Sven Peeters



Solution 1:[1]

As you have the same characters in the column value same as your delimiter character, with no escape character in your dataset will throw an error.

You have to change the delimiter character to a different character or add a Quote character and Escape character to Double quote(").

enter image description here

Downloaded file:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NiharikaMoola-MT