Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Tips and tricks of the brand new LOAD DATA command - Part II

Article
Andreas Schneider · Jan 9, 2022 1m read
Open Exchange

Tips and tricks of the brand new LOAD DATA command - Part II

7) You need the right driver

If you want to execute the LOAD DATA sql command you have to choose the driver from 2021.2! If you select the wrong driver and use the LOAD DATA sql command you get something like

 Error: [SQLCODE: <-1>:<Invalid SQL statement>]
[Location: <Prepare>]
[%msg: < LITERAL ('%qpar') expected, : found^LOAD DATA FROM FILE :%qpar>]

I've forked the jdbc driver repo https://github.com/intersystems-community/iris-driver-distribution and added the driver from InterSystems IRIS Version 2021.2.0.617

You can download the intersystems-jdbc-3.3.0.jar from here: https://github.com/andreas5588/iris-driver-distribution/tree/main/JDK18

 

8) Prevent encoding problems

Setting the JVM arg for the %Java Server can be done by Portal or console:

set srv = $system.external.getServer("%Java Server")
set srv.JVMArgs = "-Dfile.encoding=UTF-8"
set modifiedserver = $system.external.modifyServer(srv)

Andreas

#InterSystems IRIS
Check the related application on InterSystems Open Exchange

Source URL:https://community.intersystems.com/post/tips-and-tricks-brand-new-load-data-command-part-ii