How to import a CSV file without headers?

jamesgb
Kilo Explorer

Hello,

I am wondering if it is possible to import a CSV file that it doesn't any header. I tried and ServiceNow says expected two columns but there is only one.

I checked out on google and I see that some peope having same requirement sometimes while working this type of no header data files.

Have you ever tried? Is there any feature in ServiceNow for this?

---

1 ACCEPTED SOLUTION

So the short answer is "You need headers to import a CSV in ServiceNow." How you get those headers in is up to you (or the upstream data provider.)



If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.



If you are viewing this from the community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View.



Thank you


View solution in original post

13 REPLIES 13

Is there a way to get the headers added from the system that is creating them? Can you work with that developer and/or vendor?



If not, you'll likely need to create some "shim" or "middle-ware" to add them before they get to ServiceNow as the import engine expects headers to be there and won't be able to function with out them.


Vendor will not change files.



And yes, I have been considering the option that I may tame the file with an applicaton/script/etc.---


So the short answer is "You need headers to import a CSV in ServiceNow." How you get those headers in is up to you (or the upstream data provider.)



If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.



If you are viewing this from the community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View.



Thank you


Not sure why ServiceNow don't offer the option to import based on positional data. This would allow data without headers to be imported, columns could then be given the incremental "ColumnX" naming convention and Transform Maps etc., use that. This would allow imports without headers and give me scope to fix my issue below.



I have a similar issue with a data source (Google Fusion Tables) which outputs data with identical column names which SN will fail to import, if I could tell it the data had no column, I could import and discard the first row. As it stands, I will have to develop something which proxies our requests to Google, manipulates the results and creates a file for a defined data source import in ServiceNow. Seems like this should be unnecessary.



Google Fusion Table supports CSV, TSV, HTML, JSON, JSON is the default but Google doesn't adhere to JSON standards and the resulant JSON is complex (with a mapping structure contained at the top of the JSON, a nested layout not supported by SN and the whole JSON bound to a return javascript function). For me CSV/TSV is the only option but needs to be manipulated before SN will ingest it.


I love the idea. I invite you to open an enhancement request! Our product managers DO listen.


Enhancement requests: Tell us how you would improve the ServiceNow product