Connecting to JDBC
The JDBC generic data provider option lets you connect to data sources that have a JDBC driver. Since there are third-party drivers available for a wide range of databases and other data sources, this means that Dundas BI has the ability to connect to more data sources out-of-the-box than we can list. You can often use an existing JDBC driver rather than rely on a custom data provider.
Here are some examples of data sources that have a JDBC driver:
- Amazon Athena (Amazon S3)
- Apache Phoenix
There are some limitations to be aware of when connecting via JDBC. See Dundas BI - Product Notes for more details.
When you or your organization have your own Dundas BI installation, you can install whichever drivers you like on the computer(s) where Dundas BI is installed.
If Dundas BI is running on Windows, the JDBC data connector requires a 64-bit version of the Java SE Runtime Environment version 8 or above to be installed.
In Dundas BI when logged on as an administrator, indicate the location where Dundas BI will be able to locate your JDBC driver files in the Path To JDBC Drivers configuration setting.
Dundas BI needs read access to the files. On Windows, Dundas BI runs as the Network Service identity unless you chose a different option for the application pool when installing. On Linux, Dundas BI runs as the dundasbi user/group.
With a JDBC driver installed and configured, you can create a data connector in Dundas BI that uses the driver.
From the main menu, click New, and then select Data Connector.
In the New Data Connector dialog, set a Name, and then set Data Provider to JDBC.
Next, supply the required credentials:
- Enter the JDBC URL. This will be different for every database and depends on the JDBC driver. For example, the JDBC URL for Amazon Athena is jdbc:awsathena://athena.us-east-1.amazonaws.com:443.
- Enter the User Name for your database account.
- Enter the Password for your database account.
If needed, click to expand the Advanced section to configure settings such as the following.
3.1. Driver properties
Some connection properties cannot be included directly in the JDBC URL and have to be provided separately in the Driver Properties field. Similar to the URL, the list of properties and their format are different for each database and are typically documented by the JDBC driver provider.
For example, as documented by Amazon, the Amazon Athena JDBC driver can take parameters as part of the JDBC URL:
But also requires the s3_staging_dir to indicate a location to which the query output is written:
3.2. Driver class name
Older JDBC drivers may require a Driver Class Name to enable the classes in the JAR file. For example, the main JDBC driver class for Amazon Athena is com.amazonaws.athena.jdbc.AthenaDriver.
3.3. Use PreparedStatement
Certain non-JDBC compliant drivers may produce an error in certain cases, which can be avoided by unchecking the Use PrepareStatement advanced option.
4. Java VM path
Some JDBC drivers require additional binary libraries (examples include the DB2 and SQL Server databases when using Windows Authentication).
To indicate the location of such libraries, click Admin from the main menu when logged in as an administrator, click to expand Setup and select Config to navigate to configuration settings.
Choose the option to show advanced settings, find the setting JVM Library Path and edit it to indicate the folder path.