You can use the DataDirect driver provided for Db2 to connect to Db2
warehouses.
About this task
This task presents a sample configuration to Db2 Warehouse using the following DataDirect driver:
/nz/export/ae/products/fluidquery/libs/generic/data-direct-drivers/Db2/FOdb2.jar
Procedure
-
Use the following connection template:
dataDirectConnectorTemplates/Db2_connection.xml
<?xml version="1.0" encoding="UTF-8"?>
<connection>
<driverClass>com.ibm.fluidquery.jdbc.db2.DB2Driver</driverClass>
<classPath>/nz/export/ae/products/fluidquery/libs/generic/data-direct-drivers/Db2/</classPath>
<connectionURL>jdbc:ibm:db2://<your_hostname>:<port>;databaseName=bludb;AuthenticationMethod=encryptedPassword</connectionURL>
<jdbc-properties>
<property>
<name>user</name>
<value><your_user></value>
</property>
<property>
<name>password</name>
<value><your_password></value>
</property>
</jdbc-properties>
</connection>
-
Configure the connection using generic connector:
./fqConfigure.sh --provider generic
--service generic --config dashDB_2 --connectionXmlPath
dataDirectConnectorTemplates/Db2_connection.xml
-
Register the function in the database:
./fqRegister.sh --config dashDB_2 --udtf <function_name>