Data Imports CSV file help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2009 05:25 AM
I was just wondering if anyone has tried importing into service-now with anything that is not a comma delimited file. Since we have commas in our actual data our guys have programmed a pipe ( | ) delimited file. I have not tried this since I have always had problems getting the csv file to import. I usually import the data to excel then import to service-now but since we want to run a nightly update of this data I'm trying to figure out what we can do since the only way we can export the data from our system is via text file (.txt).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2009 10:44 AM
I was curious what would happen with the a | delimited file so I gave it a try and basically it put the whole line into 1 field.
If you have commas in your data can you create a csv file something like this because it will import correctly.
"data1,data1","data2","data3","data4,data4"
If you have quotes in your data also then
"data1,""quotes in my data"" data1","data2","data3","data4,data4"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2009 01:08 PM
Yeah I was going to try the | also but got busy with some other stuff that needed done first. Thanks for the info it will definitely help me when I start to work on this task again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2009 04:57 PM
Looks like SNC is fairly hard-coded to use only commas as delimiters in text files. Transform Maps are applied after the data is imported into the Import Set Table so I don't think you could correct the data that way.
Perhaps a business rule on the Transform Map could take a "raw" import set table with a one column string of pipe-delimiter and separate into separate columns. Anyway, just a suggestion and only in theory.
Also consider raising a /HI server request for this useful functionality. A user should be able to specify which delimiter to use when importing a text file; such as comma, pipe, or tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2009 10:49 PM
To process CSV files that are delimited by any character other than ",", first, create the data source either by clicking "New" on the Data Source list, create the data source using the "Attachment" file retrieval method and attach the CSV file to this data source. Next, personalize the Data Source form to expose the "CSV Delimiter" field, in this field, for example, enter the character you want as the delimiter for the CSV file eg. '|' (without the quotes)
Test load the data source, the CSV loader will parse the CSV file expecting it to be "|" delimited (separated).
a screen shot of the data source can be seen here:
http://wiki.service-now.com/index.php?title=Data_Sources#CSV