How do I connect Birst to a database that supports ODBC?

Use the JDBC-ODBC Bridge with an Easysoft ODBC driver to connect Birst to a database that supports ODBC, enabling you to analyse data stored in back ends such as MongoDB and Salesforce from your Birst dashboard.

Birst is a Java application. To interact with a data source such as Salesforce, a Java application uses a JDBC driver. (JDBC is a Java application programming interface (API) that connects Java to relational databases and other tabular data such as spreadsheets and flat files.)

Easysoft ODBC drivers use ODBC to connect to the database for which they provide access. ODBC is another data access technology, the Microsoft implementation of which is included with Windows.

The JDBC-ODBC Bridge allows a Java application using JDBC to access an ODBC driver. The JDBC-ODBC Bridge and ODBC driver don't have to be installed on the same machine.

Example: How to connect Birst to Salesforce

The components necessary to connect Birst to Salesforce are:

Birst <-> JDBC-ODBC Bridge <-> Salesforce ODBC driver <-> Salesforce

Example: How to connect Birst to MongoDB

The components necessary to connect Birst to MongoDB are:

Birst <-> JDBC-ODBC Bridge <-> MongoDB ODBC driver <-> MongoDB

Installing, licensing, and testing the Easysoft ODBC driver

  1. Download the Windows Salesforce ODBC driver or Windows MongoDB ODBC driver as required.
  2. Install and license the Easysoft ODBC driver on a Windows machine.

    For installation instructions, refer to the Salesforce ODBC driver documentation or MongoDB ODBC driver documentation.

Before you can use the Easysoft ODBC driver to connect Birst to Salesforce or MongoDB, you need to configure a system ODBC data source in ODBC Data Source Administrator. An ODBC data source stores the connection details for the target database (in this case, Salesforce or MongoDB) and the ODBC driver that's required to connect to it (in this case, the Salesforce ODBC driver or the MongoDB ODBC driver).

To run ODBC Data Source Administrator, in the Windows Run dialog box, enter this command:

%windir%\syswow64\odbcad32.exe

Creating a Salesforce ODBC data source

  1. Choose the System DSN tab, and then choose Add.
  2. In the Create New Data Source dialog box, choose Easysoft ODBC-Salesforce Driver, and then choose Finish.
  3. Complete the DSN Setup dialog box:
    Setting Value
    DSN Salesforce
    User Name The name of your Salesforce user. For example, myuser@mydomain.com.
    Password The password for your Salesforce user.
    Token The security token for your Salesforce user, if required.

    To find out whether you need to supply a security token, choose the Test button. If the connection attempt fails with an error which contains LOGIN_MUST_USE_SECURITY_TOKEN, you need to supply one.

    Salesforce emails the security token to the email address associated with your Salesforce user account. If you have not received a security token, you can regenerate it. Salesforce will then email the new security token to you. To regenerate your security token, log in to Salesforce and then choose Setup from the user menu. Search for "security token" in the Quick Find box. Choose Reset Security Token in the Reset Security Token page. When you receive the token in your email client, copy it and then paste it into the Token field.

  4. Use the Test button to verify that you can successfully connect to Salesforce.

Creating a MongoDB ODBC data source

  1. Choose the System DSN tab, and then choose Add.
  2. In the Create New Data Source dialog box, choose Easysoft ODBC-MongoDB Driver, and then choose Finish.
  3. Complete these fields in the Easysoft ODBC-MongoDB Driver DSN Setup dialog box:
    Setting Value
    DSN MongoDB
    Description Easysoft MongoDB ODBC driver
    Server The name or IP address of the host where your MongoDB instance is running.
    User Name If you need to supply a user name to access your MongoDB database, enter it here.
    Password The password for your MongoDB user name.
  4. Use the Test button to verify that you can successfully connect to your MongoDB database.

Installing and licensing the JDBC-ODBC Bridge

  1. Download the JDBC-ODBC Bridge.
  2. Install and license the JDBC-ODBC Bridge on the machine where the Easysoft ODBC driver is installed.

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

  3. In Windows Services, make sure that the Easysoft JDBC-ODBC Bridge Server x64 service is running, and that the Easysoft JDBC-ODBC Bridge Server service is stopped (stop the service and in the server properties, set the Startup type to Manual).

Connecting Birst to your ODBC database

You can now connect Birst to Salesforce or MongoDB:

  1. Log into birst.com.
  2. Create a new space.
  3. In the Welcome page, choose Use Birst Connect.
  4. Launch the default configuration. Download both BirstConnect.zip and the .jlnp file that launching the configuration generates.
  5. On a Windows machine where Java is installed, create a top-level folder named BirstConnect. For example:
    c:\BirstConnect
  6. Copy BirstConnect.zip and the .jlnp file to this new folder.
  7. Extract the contents of BirstConnect.zip.
  8. Copy EJOB.jar to the the drive:\BirstConnect\dist\lib folder.

    EJOB.jar is installed in the following location on the machine where you installed the JDBC-ODBC Bridge:

    install_dir\Jars

    The default location for install_dir is drive:\Program Files (x86)\Easysoft Limited\Easysoft JDBC-ODBC Bridge.

  9. In the BirstConnect folder, open BirstConnect.xml in a text editor.
  10. Edit these properties in BirstConnect.xml:
    Property Value
    JAVA_HOME Replace %JAVA_HOME% with the location where Java is installed. For example, C:\Program Files\Java\jdk1.7.0_45.
    BirstConnect_Home drive:\BirstConnect
    -Djnlp.file Replace BirstConnect.jnlp with the name of the .jnlp file that you've just generated.
  11. Open a command prompt and change to the drive:\BirstConnect folder.
  12. Type BirstConnect install to install the BirstConnect Service.
  13. In the commandline subfolder, open cmdUI.bat in a text editor. Change the settings in this file to match the ones you've just changed in BirstConnect.xml.
  14. In a command prompt, run cmdUI.bat.
  15. In Birst Connect, choose Add Task.
  16. In the Task Name box, Easysoft.
  17. In the Sources tab, choose Add Table(s).
  18. Complete the dialog box as follows:
    Setting Value
    Database Type Generic JDBC Database
    Driver Name easysoft.sql.jobDriver
    Connection String jdbc:easysoft://localhost:8831/my_odbc_system_dsn:logonuser=my_windows_user:logonpassword=my_windows_password
  19. Choose the Get Tables button.
  20. Select the table you want and choose OK.
  21. Run your new task.

    The data is now available to Birst for processing.