Connecting to HubSpot
The Sisense HubSpot connector is a certified connector that allows you to import data from the HubSpot API into Sisense via the Sisense generic JDBC connector. The HubSpot connector offers the most natural way to connect to HubSpot data including Contacts, Deals, Emails, Companies, and more, and provides additional powerful features.
Sisense HubSpot is a certified connector. The support for the connector is provided by Sisense and will be assisted by the certification partner's support, if needed. For any support issues or additional functionality requests, please contact your Sisense representative or open a request through our Help Center. For advanced inquiries specific to driver functionality, you can also contact our certification partner’s support directly via [email protected].
After you have downloaded the driver, you can connect through a connection string in Sisense. The connection string is used to authenticate users who connect to the HubSpot APIs. To obtain a connection string, you will need to register a HubSpot API. Once you have connected to HubSpot, you can import a variety of tables from the HubSpot API.
This page describes how to download the HubSpot driver and deploy it, how to connect to HubSpot with a connection string, provides information about the HubSpot data model, and more.
- Downloading the HubSpot JDBC Driver
- Deploying the HubSpot JDBC Driver
- Connecting to HubSpot
- Adding HubSpot Tables to your ElastiCube
- HubSpot Connector: Additional Resources
You can download the HubSpot JDBC driver here.
To run the setup, execute the following command: java -jar setup.jar (OR, if your system is set up to run Java applications, double-click on setup.jar).
During the installation, pay attention to the path of the installation (you will need it later on, to direct Sisense to the Jar file. The default path is C:\Program Files\CData\CData JDBC Driver for HubSpot\lib).
Note: The install file (setup.jar) is a Java application that requires Java 6 (J2SE) or above to run. If you do not have Java 6 installed, you may download it from here.
Sisense uses connection strings to connect to HubSpot and import data into Sisense. The default connection string for HubSpot is: jdbc:hubspot:InitiateOAuth=GETANDREFRESH;
After you connect using the default connection string, Sisense redirects you to Hubspot’s homepage where you log in and your account is authenticated. Once the account is authenticated, the relevant tables can be added to your ElastiCube.
If you want to customize your connection string, you can by creating an HubSpot app and passing additional connection string parameters. For more information, see Creating an App at the end of this page.
If you have any issues connecting to your data source, see Troubleshooting JDBC Data Connectors.
To access HubSpot’s REST API from Sisense with a customized connection string, you must provide valid Oauth HubSpot credentials through a connection string. These credentials are provided by HubSpot when you create an application.
After you receive your credentials from HubSpot, you can create the connection string and provide Sisense with it to connect to your data.
Each connection string contains a authentication parameters that the data source uses to verify your identity and what information you can export to Sisense.
The following is an example of a HubSpot connection string and its mandatory parameters:
- HubId: Set your Hubspot account ID to HubId in the connection string.
- OAuthClientId: Set this to the client Id in the connection string.
- OAuthClientSecret: Set this to the client Id in the connection string.
- InitiateOAuth: Set to GETANDREFRESH.
- CallbackURL: Following HubSpot’s migration to OAuth 2.0, the CallbackURL needs to be SSL compliant so it should be https://localhost.
For more information about connection strings and optional parameters, see Connection String Parameters.
When you connect to HubSpot, you are redirected to HubSpot’s site where your Administrator must grant access to your account.
Follow the steps below to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret:
- Log into your HubSpot developer account.
- Click Create App.
- In the App name field, enter a name and select Public or Private.
- Click Create.
- In the Apps page, click the name of your app.
- Copy the following values and add them to your connection described in the next procedure.
Note: Do not select any scopes in your account, as this will prevent access to your data.
- In the Data page, open an ElastiCubeor create a new ElastiCube.
- In the Model Editor, click . The Add Data dialog box is displayed.
- Click Generic JDBC to open the JDBC settings.
- In Connection String, enter the HubSpot URL. See Creating a Connection String for more information.
- In JDBC JARs Folder, enter the name of the directory where the HubSpot JAR file is located (see Deploying the HubSpot JDBC Driver).
- In Driver's Class Name, enter the following class name: cdata.jdbc.hubspot.HubSpotDriver.
- In User Name and Password, enter your HubSpot credentials. These fields are not required if the user name and password were provided in the connection string.
- Click Next. A list of tables in the database are displayed. All tables and views associated with the database will appear in a new window.
- From the Tables list, select the relevant table or view you want to work with. You can click next to the relevant table or click Preview to see a preview of the data inside it.
- (Optional) Click + to customize the data you want to import with SQL. See Importing Data with Custom Queries for more information.
- After you have selected all the relevant tables, click Done. The tables are added to your data model.
For the full documentation set for the HubSpot connector, click here.
For connection string options, click here.
For information on the HubSpot data model, click here.