Ready to get started?

Download a free trial of the HubDB Driver to get started:

 Download Now

Learn more:

HubDB Icon HubDB JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with HubDB.

Bidirectional Access to HubDB Data from FileMaker Pro



Use the MySQL Remoting feature of the JDBC driver to integrate HubDB data in Filemaker Pro for Mac or Windows.

This article shows how to use the CData JDBC Driver for HubDB to integrate with the External SQL Sources (ESS) feature in FileMaker Pro, which allows you to link records in FileMaker Pro with related records in your other operational data stores.

You will use the MySQL Remoting feature to access HubDB as a remote MySQL database. The CData JDBC Driver for HubDB implements both the JDBC and MySQL standards to integrate with applications like FileMaker Pro that support connections to traditional databases like MySQL but not generic JDBC connections.

Selecting a FileMaker Pro Integration

There are two data access modes in FileMaker Pro:

  • Data Import: HubDB data is copied into a FileMaker Pro database and can be refreshed on demand. To streamline this solution, use the CData ODBC driver, as FileMaker Pro supports ODBC natively, but it does not support JDBC. To use this approach, see ODBC HubDB Integration in FileMaker Pro.
  • ESS: Instead of working with a local copy of the data, you can use the JDBC driver to create an external SQL source. The remote data can be modified in FileMaker Pro and tables can be used in the relationships graph like standard FileMaker Pro tables.

Outlining the ESS Setup

The JDBC driver is part of a data access chain. Compared to a native ODBC integration, FileMaker Pro integrations that use MySQL remoting have several additional components. This article shows how to link each of the following components with FileMaker Pro:

  1. The CData JDBC driver.
  2. The CData MySQL Remoting daemon (included with the driver).
  3. An ODBC driver for MySQL.

    On Windows, FileMaker Pro requires the official MySQL driver, the MySQL Connector\ODBC (currently, the best option is Connector\ODBC 8.0.11).

    On macOS, FileMaker Pro requires the Actual Technologies Open Databases ODBC driver.

  4. An ODBC driver manager.

    On Windows, the driver manager is built in. On macOS, you will need to install a driver manager before installing the ODBC driver; install the iODBC driver manager.

Start the Remoting Daemon

Follow the steps below to enable the MySQL Remoting feature:

  1. Open Terminal and change to the lib subfolder in the installation folder.

    $ cd "/Applications/CData/CData JDBC Driver for HubDB/lib"
  2. Edit the configuration file (cdata.jdbc.hubdb.remoting.ini by default):
    • Update the [databases] section with the JDBC Connection URL for HubDB: hubdb = "AuthScheme=OAuth;OAuthClientID=MyOAuthClientID;OAuthClientSecret=MyOAuthClientSecret;CallbackURL=http://localhost:33333;InitiateOAuth=GETANDREFRESH"

      There are two authentication methods available for connecting to HubDB data source: OAuth Authentication with a public HubSpot application and authentication with a Private application token.

      Using a Custom OAuth App

      AuthScheme must be set to "OAuth" in all OAuth flows. Be sure to review the Help documentation for the required connection properties for you specific authentication needs (desktop applications, web applications, and headless machines).

      Follow the steps below to register an application and obtain the OAuth client credentials:

      1. Log into your HubSpot app developer account.
        • Note that it must be an app developer account. Standard HubSpot accounts cannot create public apps.
      2. On the developer account home page, click the Apps tab.
      3. Click Create app.
      4. On the App info tab, enter and optionally modify values that are displayed to users when they connect. These values include the public application name, application logo, and a description of the application.
      5. On the Auth tab, supply a callback URL in the "Redirect URLs" box.
        • If you're creating a desktop application, set this to a locally accessible URL like http://localhost:33333.
        • If you are creating a Web application, set this to a trusted URL where you want users to be redirected to when they authorize your application.
      6. Click Create App. HubSpot then generates the application, along with its associated credentials.
      7. On the Auth tab, note the Client ID and Client secret. You will use these later to configure the driver.
      8. Under Scopes, select any scopes you need for your application's intended functionality.

        A minimum of the following scopes is required to access tables:

        • hubdb
        • oauth
        • crm.objects.owners.read
      9. Click Save changes.
      10. Install the application into a production portal with access to the features that are required by the integration.
        • Under "Install URL (OAuth)", click Copy full URL to copy the installation URL for your application.
        • Navigate to the copied link in your browser. Select a standard account in which to install the application.
        • Click Connect app. You can close the resulting tab.

      Using a Private App

      To connect using a HubSpot private application token, set the AuthScheme property to "PrivateApp."

      You can generate a private application token by following the steps below:

      1. In your HubDB account, click the settings icon (the gear) in the main navigation bar.
      2. In the left sidebar menu, navigate to Integrations > Private Apps.
      3. Click Create private app.
      4. On the Basic Info tab, configure the details of your application (name, logo, and description).
      5. On the Scopes tab, select Read or Write for each scope you want your private application to be able to access.
      6. A minimum of hubdb and crm.objects.owners.read is required to access tables.
      7. After you are done configuring your application, click Create app in the top right.
      8. Review the info about your application's access token, click Continue creating, and then Show token.
      9. Click Copy to copy the private application token.

      To connect, set PrivateAppToken to the private application token you retrieved.

      See the help documentation for more information about the available connection properties and other configuration options for remoting.

  3. Start the MySQL daemon by specifying the configuration file or settings on the command line. The example below uses the included sample configuration file.

    $ java -jar cdata.jdbc.hubdb.jar -f "cdata.jdbc.hubdb.remoting.ini"

Create the DSN

After connecting successfully to HubDB and starting the MySQL daemon, create a MySQL ODBC data source. When working with ODBC data sources, you specify connection properties in a DSN (data source name).

If you have not already obtained an ODBC driver and driver manager, refer to "Outlining the ESS Setup" to determine the components supported for your platform.

macOS

Follow the steps below to use the iODBC graphical administrator tool:

  1. Open iODBC by searching in the launchpad.
  2. On the System DSN tab, click Add and select Actual Open Source Databases.
  3. Provide the following information to complete the wizard:
    • Name: Enter the DSN.
    • Server: Enter 127.0.0.1 or the address of the machine where the MySQL daemon is running.
    • Port: Enter the port that the daemon is listening on. For example, 3306.
    • Database: Enter the name of a database specified in the config file for the daemon. For example, HubDB.
    • In the Metadata tab, check the boxes for:
      • "Ignore schema in column specifications"
      • "Don't use INFORMATION_SCHEMA for metadata"
  4. Click Test Connection and enter your credentials in the dialog.

Windows

You can use the built-in Microsoft ODBC Data Source Administrator to create the ODBC DSN.

  1. From the Control Panel, select Set Up Data Sources (ODBC). The ODBC Data Source Administrator is displayed.
  2. On the System DSN tab, click Add and select the MySQL ODBC driver.
  3. Provide the following information to complete the wizard:
    • Name: Enter the DSN.
    • Server: Enter 127.0.0.1 or the address of the machine where the MySQL daemon is running.
    • Port: Enter the port that the daemon is listening on. For example, 3306.
    • Database: Enter the name of a database specified in the config file for the daemon. For example, HubDB.
    • In the Metadata tab, check the boxes for:
      • "Ignore schema in column specifications"
      • "Don't use INFORMATION_SCHEMA for metadata"
  4. Click Test Connection and enter your credentials in the dialog.

Create HubDB Shadow Tables

Shadow tables exist in an external SQL source but can be used in much the same way as other tables in your FileMaker database; you can add them in the relationships graph, browse data, and create layouts on them.

  1. Click File -> Manage -> Database.
  2. On the Relationships tab of the resulting dialog, click the Add a Table button in the Table/Relationships section.
  3. In the Data Source menu, select Add ODBC Data Source and then select the DSN you created in the previous section.

After specifying the username and password for the DSN, you can add HubDB tables to the relationships graph. You can now scroll through, sort, edit, and summarize HubDB data by clicking View -> Browse Mode, just as you would a remote MySQL database.