How do I change the CSV file delimiter from a comma "," to a carrot "^"?

Kris Jensen
Tera Guru

Hi.   We are exporting data as a CSV (customer requires it) but we can't use a comma as one of the fields is a comments field which is full of commas.   I want to use a carrot ^, since this is not a common character.

how do I change or set the delimiter character?

Kris

14 REPLIES 14

Chuck Tomasi
Tera Patron

In your data source, you should have a CSV delimiter field.



find_real_file.png



Set it as needed.



http://wiki.servicenow.com/index.php?title=Data_Sources


Kris Jensen
Tera Guru

Hi.   This looks like this is for importing into Service Now.   I need to export out of Service Now.


Sorry Kris. I read it too quickly. There is no straightforward way to do this. That being said, there is an article that may help.



Beyond the Comma - File Export Delimiters-John Andersen


drjohnchun
Tera Guru

Kris,



The CSV format is a well established standard per IETF RFC 4180; as long as the CSV generator conforms to this standard, any commas in the data don't cause issues. The standard calls for each field to be enclosed in double quotes, if it contains special characters (see Section 2.6); if the field data contains double quotes, they must be escaped. RFC 4180 Section 2.7 reads



If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example:



            "aaa","b""bb","ccc"



So my suggestion is to enclose the fields containing commas using double quotes.



Please feel free to connect, follow, mark helpful, like, endorse.


John Chun, PhD PMP see John's LinkedIn profile


visit snowaid