JDBC File Loader (via MID Server)

enojardi
ServiceNow Employee
ServiceNow Employee

How many times have you thought? I wish I could use JDBC to connect and extract data from a flat file instead of a database.

Well… This application (first release / beta version) does exactly that… and more:

* Connect using JDBC to a file via the MID Server

* Support for any flat file (CSV, TXT, etc)

* Support for zipped (.zip) files (containing a flat file)

* Choose any column separator you like

* Choose header row number or no header row at all

* Support for wildcard (*) and dynamic (scripted) file names

* Support for processing multiple files at once (using * wildcard)

* Load all rows from the file or execute your own "SELECT" SQL statement

* Select Import Set mode: Load only or Load & Transform (if a map is available)

* Bonus (experimental): onComplete file action: Copy, Move, Rename or Delete the file!

Link to App in Share: ServiceNow Share

70 REPLIES 70

enojardi
ServiceNow Employee
ServiceNow Employee

Hi Herman,

 

Unfortunately XML is not supported, given the jar file only supports CSV/flat files. In order to make it work, you'd have to find a suitable XML driver for reading files and "intercept" the logic in the JDBCFileLoaderProbe MID Server Script Include.

 

Hope that helps,

Jonny

Hatmaker
Kilo Contributor

Hi Jonatan,

great job, thanks for sharing this!

We are using your solution every day and it works great.

Regretfully with the relaunched "ServiceNow Share" the old reviews and discussions got removed

Could you please tell me the path structure for a windows network share on a windows MID Server?
Currently I am using the following format and it works for a local file: \\\\SERVERNAME\\FOLDER\\FILENAME.csv

How should the path look like to access a remote share from MID Server?

Regards,

enojardi
ServiceNow Employee
ServiceNow Employee

Hi, yeah a shame we lost all the comments. From memory, some people were able to do it in UNIX systems and others that had issues simply mapped to a drive letter (e.g. Z:\).

Cheers,

Jonny

This work for me

 

answer = "\\\\\\\\afs27.services.eni.intranet\\\\erm-afs-st\\\\Data\\\\HRE\\\\Inbound\\\\ORGANIZATION.csv"

Hello, Did you ever get this figured out?  Mapped drives aren't working for us.  Thanks!