IBMStreams/streamsx.jdbc

JDBCRun operator has to support several files as jdbc driver

Closed this issue · 3 comments

Currently the JDBCRun operator support only one jar file as jdbc driver.
But some databases like Teradata delivers 2 jar files as jdbc driver.
Therefor the JDBCRun operator has to support several files as jdbc driver

As I understood, the JDBCRun operator supports a single jar file as the driver specification. The current implementation wouldn't support the teradata DB because the driver is provided in 2 different jar files.
I see 2 possible solutions:

  1. list of comma separated jar files
  2. directory path that scans for jar files

I would prefer the solution 1) because you can exact decide, which files you are going to use. The second solution could catch other jar files that are not required. In oposite, they could cause conflicts.
The 'jdbcDriverLib' is a parameter. Change the setupClassPath() function, so you check if the 'jdbcDriverLib' is a comma separated list. If so then create a list, check the path and expand the classpath

The file AbstractJDBCOperator.java has been adapted.
Thi string parameter jdbcDriverLib specifies the path and the filename of jdbc driver libraries in one comma separated string.

The tests were successfully. Issue closed