1. Get the JDBC driver JAR file from the respective database vendor and copy it to the "<Spotfire Server Installation Path>\tomcat\custom-ext-informationservices" for versions 12.1.0 and higher. For earlier versions, this would be "<Spotfire Server Installation Path>\tomcat\custom-ext" folder.
2. Find or create a data source template XML for the new driver/database. Only the following three settings are mandatory, but more may be required based on the particular driver/database:
- type-name A unique name for the configuration.
- driver The JDBC driver Java class used for creating connections.
- connection-url-pattern A pattern for the connection URL. The URL syntax is driver specific.
Place all the XML settings along with the above three inside <jdbc-type-settings> ... </jdbc-type-settings>
Example: XML for Oracle DB
-----------------
<jdbc-type-settings>
<type-name>oracle</type-name>
<driver>oracle.jdbc.OracleDriver</driver>
<connection-url-pattern>jdbc:oracle:thin:@<host>:<port1521>:<sid></connection-url-pattern>
</jdbc-type-settings>
------------------
Where Oracle JDBC driver class : oracle.jdbc.OracleDriver
Oracle Connection URL : jdbc:oracle:thin:@host:port:sid
3. Add the new data source template XML to the Spotfire Server using the Spotfire Configuration Tool.
Method 1: Using Spotfire Configuration GUI Tool:
============================================
a). Run <Spotfire Server Installation Path>\tomcat\bin\uiconfig.bat .
b). Enter Tool Password when prompted.
c). Go to Configuration Tab -> Data Source Templates. Click New .
d). Enter a unique Name and copy the XML created earlier into the Data Source Template section (Step 1). The Open button can also be used to open the above XML file if saved locally.
e). Click on OK.
f). Click on the Checkbox located next to the New template to enable it. Make sure the status bar at the bottom shows "XML Parsed OK" which means the driver is present in the tomcat\lib folder and the XML is valid.
g). Save the configuration into the database.
Method 2: Using Spotfire Configuration Command Line Tool:
=====================================================
a). Open a command prompt or Shell and navigate to "<Spotfire Server Installation Path>\tomcat\bin\" folder/directory.
b). Run following command to export the currently running configuration to configuration.xml file. Replace the string toolpassword with the correct Tool Password.
./config.sh export-config -f -t "toolpassword"
OR
config.bat export-config -f -t "toolpassword"
c). Run the following command to add a new template with the above XML (Step1).
./config.sh add-ds-template -n "NewDBTemplate" -e true <Path to above XML template file>
OR
config.bat add-ds-template -n "NewDBTemplate" -e true <Path to above XML template file>
d). Run the following command to import the updated configuration into database. Replace the string toolpassword with the correct Tool Password.
./config.sh import-config -c "Added New Hive Template" -t "toolpassword"
OR
config.bat import-config -c "Added New Hive Template" -t "toolpassword"
Note: See add-ds-template for more details.
4. Restart the Spotfire Server service/process.