The CreatorCon Call for Content is officially open! Get started here.

Import .dat file into SN

prithvi232
Kilo Contributor

SN supported data formats for import are csv, excel and xml. However, I have a use case where I have to import data from .dat files with specific delimiters (obtained from an external system) into SN. Has anyone come across such a use case before? If so, please let me know what your approach was.

15 REPLIES 15

martygrinstead
ServiceNow Employee
ServiceNow Employee

Hi Prithvi,



Is the .dat file a binary file?   Are you able to open it with a text editor and see the delimiters?


I'm not aware of any way to parse a binary file, but maybe with some deeper knowledge of the format of the file, someone may have some ideas.



Is there a sample .dat file available for review?



Marty


I was thinking if we can import the data from the .dat file directly into SN and then implement a script within SN to perform the delimitation and save the data in a custom table. I know SN doesn't support .txt or .dat format inputs, but was just curious if anyone had a similar scenario.


See my earlier comment. You can simply change the name to filename.csv, use a standard import set, and specify a delimiter (if not a comma.)


In my case, source is not a fixed length delimited file. So I have automated the process of inserting (,) at desired positions and converted the .dat to .csv file - using a java code. And from your comments I understand that .csv is the best format for this use case.



Thanks Chuck.



Prit