Working with Java data in Qlik Sense

Qlik Sense like many other data visualisation applications supports ODBC, a generic data access interface, which enables the default choice of data sources to be extended. Qlik Sense does not include a connector that will allow it to access a Java data source, however.

Java data sources are accessed by using a connector called a JDBC driver. A JDBC driver allows a Java application to access external data. For example, the Amazon Athena JDBC driver allows Java applications to access data stored in an Amazon S3 Bucket.

Qlik Sense is not written in Java however. Qlik Sense uses an ODBC driver, a different piece of database middleware, to access external data. (It also includes a number of dedicated connectors, for example one that enables Qlik Sense to access Salesforce)

The ODBC-JDBC Gateway connects an application that uses ODBC to an application that uses JDBC. To the application, the ODBC-JDBC Gateway is an ODBC driver. To the JDBC driver the ODBC-JDBC Gateway is a Java application.

Installing and licensing the ODBC-JDBC Gateway

  1. Download the Windows ODBC-JDBC Gateway.
  2. Install and license the ODBC-JDBC Gateway on the Windows machine where Qlik Sense is installed.

    For installation instructions, refer to the ODBC-JDBC Gateway documentation.

  3. Use the ODBC-JDBC Gateway Setup Java Interface dialog box to select the JVM included in the JRE or JDK distribution recommended by your Java database vendor.

Configuring an ODBC data source

Before you can use the ODBC-JDBC Gateway to connect Qlik Sense to a Java database, you need to configure an ODBC data source. An ODBC data source stores the connection details for the target database.

You configure ODBC data sources in ODBC Data Source Administrator, which is included with Windows. On some versions of Windows, ODBC Data Source Administrator is located in Control Panel > Administrative Tools. On some versions of Windows, you can access ODBC Data Source Administrator by searching for "ODBC" in the taskbar search box. If presented with a choice of ODBC Data Source Administrator, choose 64-bit rather than 32-bit.

Use ODBC Data Source Administrator to create your ODBC-JDBC Gateway data source.

Creating a ODBC-JDBC Gateway ODBC data source

  1. Choose the System DSN tab, and then choose Add.
  2. In the Create New Data Source dialog box, choose ODBC-JDBC Gateway, and then choose Finish.
  3. Complete the ODBC-JDBC Gateway DSN Setup dialog box:
    Setting Value
    DSN Some descriptive text to identify the data source in Qlik Sense.
    Driver Class The driver class that identifies the JDBC driver for your target Java back end.
    Class Path The path to the JDBC driver JAR file.
    URL The JDBC URL that contains the necessary connection details to access your target Java database. Refer to your JDBC driver documentation for the correct JDBC URL syntax.
  4. Use the Test button to verify that you can successfully connect to your Java database.

You can now use the ODBC-JDBC Gateway Data Source to connect Qlik Sense to your Java database.

Connecting Qlik Sense to a Java database

  1. In Qlik Sense, create a new app.
  2. Choose Add data.
  3. In the Connect to a new data source page, choose ODBC.
  4. Choose your ODBC data source from the 64-bit list.
  5. Choose Create.
  6. Your data is displayed in the Data preview screen. (You may need to choose an Owner for the data before it is displayed.