Easysoft Blog

Fri, 29 Apr 2016

Working with Java Data in Alteryx

Alteryx provides a workflow interface for non-specialists to extract value from multiple data sources. Alteryx like many other analytics applications supports ODBC, a generic data access interface, which enables the default choice of data sources to be extended. Alteryx 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 Gemfire XD JDBC driver allows Java applications to access data stored in Gemfire XD.

Alteryx is not written in Java however. Alteryx 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 Alteryx to access Salesforce.com.)

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. (Registration required.)
  2. Install and license the ODBC-JDBC Gateway on the Windows machine where Alteryx is installed.

    For installation instructions, see the ODBC-JDBC Gateway documentation.

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

Configuring an ODBC Data Source

Before you can use the ODBC-JDBC Gateway to connect Alteryx 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 Administrator, which is included with Windows. On some versions of Windows, ODBC Administrator is located in Control Panel > Administrative Tools. On some versions of Windows, you can access ODBC Administrator by searching for "ODBC" in the taskbar search box. If presented with a choice of ODBC Administrators, choose 64-bit rather than 32-bit.

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

Creating a ODBC-JDBC Gateway ODBC Data Source for Gemfire XD

  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:
    SettingValue
    DSNSome descriptive text to identify the data source in Alteryx. For example, "Gemfire XD".
    Driver ClassThe driver class that identifies the JDBC driver for your target Java backend. For example, the Gemfire XD JDBC driver's class name is com.pivotal.gemfirexd.jdbc.ClientDriver
    Class PathThe path to the JDBC driver JAR file. For example, Gemfire XD's JDBC driver JAR file is:
    C:\Pivotal_GemFireXD_140_b50226_Windows\lib\gemfirexd-client.jar
    URLThe 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.

    For example, a JDBC URL for Gemfire XD:

    jdbc:gemfirexd://localhost:1527/
  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 Alteryx to your Java database.

Connecting Alteryx to a Java Database

  1. In Alteryx, add an Input Data control to your workflow.
  2. In the Input Data properties pane, in the Connect a File or Database list, choose Database Connection > New ODBC Connection.

    The ODBC Connection dialog box is displayed.

  3. In the Data Source Name list, choose your ODBC-JDBC Gateway data source. Choose OK.

    The Choose Table or Specify Query dialog box is displayed.

  4. Choose the SQL Editor tab. Enter a query, for example SELECT * FROM QUICKTABLE. Choose OK.
  5. To retrieve your Java data in Alteryx, in the Input Data properties pane, choose Update Sample.