Set up the Openflow Connector for HubSpot¶
Note
This connector is subject to the Snowflake Connector Terms.
This topic describes the steps to set up the Openflow Connector for HubSpot.
Prerequisites¶
- Ensure that you have reviewed About Openflow Connector for HubSpot.
- Ensure that you have Set up Openflow - Snowflake Deployments or Set up Openflow - BYOC.
- If using Openflow - Snowflake Deployments, ensure that you’ve reviewed configuring required domains and have granted access to the required domains for the Hubspot connector.
Get the credentials¶
As a HubSpot administrator, generate a HubSpot private app token or create one in your HubSpot account. This lets you authenticate your requests to the HubSpot API.
-
Log in to your HubSpot account.
-
Navigate to Settings by selecting the gear icon in the top navigation bar.
-
In the left navigation, go to Integrations » Private Apps.
-
Select Create a private app.
- Enter a name for your app.
- Navigate to the Scopes tab.
- Select the scopes required for the API requests you intend to make. To find scopes required for the API requests, see Scopes.
- Select Create app.
- Set the required scopes for the API requests you intend to make for each endpoint.
-
Select View access token to view the access token. Paste the token in the connector parameters, or save it securely.
Set up Snowflake account¶
As an Openflow administrator, perform the following tasks to set up your Snowflake account. With the
default SNOWFLAKE_MANAGED authentication strategy, the runtime’s execute-as role is the identity
the connector uses to access Snowflake, so you grant it the following privileges.
Note
If you’re deploying the connector in Openflow - BYOC Deployments and using the KEY_PAIR authentication
strategy instead of the recommended SNOWFLAKE_MANAGED, you’ll also grant this same execute-as
role to a service user rather than relying on the runtime’s managed token. See
Set up key-pair authentication for Openflow - BYOC Deployments
to create the service user.
Create database, schema, and warehouse¶
-
Create the destination database:
-
Create the destination schema:
-
Grant the required privileges to the runtime’s execute-as role:
-
Create a warehouse (or use an existing one) and grant usage privileges:
-
If any other Snowflake users require access to the tables and views ingested by the connector (for example, for custom processing in Snowflake), grant those users the execute-as role.
Set up the connector¶
As a data engineer, perform the following tasks to install and configure the connector:
Install the connector¶
To install the connector, do the following as a data engineer:
-
Navigate to the Connector library tab in Openflow.
-
On the Openflow connectors page, find the connector and select Install.
-
In the Select runtime dialog, select your runtime from the Available runtimes drop-down list and click Install.
Note
Before you install the connector, ensure that you have created a database and schema in Snowflake for the connector to store ingested data.
-
Authenticate to the deployment with your Snowflake account credentials and select Allow when prompted to allow the runtime application to access your Snowflake account. The connector installation process takes a few minutes to complete.
-
Authenticate to the runtime with your Snowflake account credentials.
The Openflow canvas appears with the connector process group added to it.
Configure the connector¶
- Right-click on the imported process group and select Parameters.
- Populate the required parameter values as described in Flow parameters.
Flow parameters¶
This section describes the flow parameters that you can configure based on the following parameter contexts:
- HubSpot Source Parameters: Used to establish connection with HubSpot.
- HubSpot Destination Parameters: Used to establish connection with Snowflake.
- HubSpot Ingestion Parameters: Used to define the configuration of data downloaded from HubSpot.
HubSpot Source Parameters¶
| Parameter | Description |
|---|---|
| HubSpot Access Token | HubSpot Private Application access token. |
HubSpot Destination Parameters¶
| Parameter | Description | Required |
|---|---|---|
| Destination Database | The database where data will be persisted. It must already exist in Snowflake. The name is case-sensitive. For unquoted identifiers, provide the name in uppercase. | Yes |
| Destination Schema | The schema where data will be persisted, which must already exist in Snowflake. The name is case-sensitive. For unquoted identifiers, provide the name in uppercase. See the following examples:
| Yes |
| Snowflake Authentication Strategy | When using:
| Yes |
| Snowflake Account Identifier | When using:
| Yes |
| Snowflake Private Key | When using:
| No |
| Snowflake Private Key File | When using:
| No |
| Snowflake Private Key Password | When using:
| No |
| Snowflake Role | When using:
| Yes |
| Snowflake Username | When using:
| Yes |
| Snowflake Warehouse | Snowflake warehouse used to run queries. | Yes |
HubSpot Ingestion Parameters¶
| Parameter | Description |
|---|---|
| Object Types | List of comma-separated HubSpot object types to ingest. Supported object type values are:
|
| Updated After | Filter objects updated after specified date or time. This parameter is optional. |
| Data Ingestion Schedule | Time between the next schedule. It should have a valid time duration, such as 30 minutes or 1 hour. |
Run the flow¶
- Right-click on the plane and select Enable all Controller Services.
- Right-click on the imported process group and select Start. The connector starts the data ingestion.
Reconfigure the connector¶
You can modify the connector parameters after the connector has started ingesting data. If the issue query criteria changes, perform the following steps to make sure that the data in the destination table is consistent.
- Stop the connector: Ensure that all Openflow processors are stopped.
- Access configuration settings: Navigate to the connector’s configuration settings within the Snowflake Openflow interface.
- Modify parameters: Adjust the parameters as required.
- Clear processor state: If you are changing ingestion criteria, then Snowflake strongly recommends that you start ingestion from the beginning to keep the data in the destination table consistent. After clearing the state in the
List Fresh HubSpot Objectsprocessor, the connector will fetch all the objects from the beginning. Manual truncation of the destination table may be needed to prevent duplication of rows.
Data structure and views¶
The connector stores data in the following two formats within your Snowflake database:
Raw data storage¶
All raw HubSpot data is stored in tables with the exact names specified in the Object Types parameter. For example:
- If you configure
Products,Contacts,Companiesin the Object Types parameter, the connector creates three tables:PRODUCTS,CONTACTS, andCOMPANIES. - Each table contains the complete JSON payload from the HubSpot API responses.
- Raw data preserves the original structure and all metadata from HubSpot.
Flattened views¶
For easier querying and analysis, the connector automatically creates flattened views for each object type:
- Each raw table has a corresponding view with the suffix
_VIEW. For example:PRODUCTS_VIEW,CONTACTS_VIEW, andCOMPANIES_VIEW. - Views extract commonly used fields from the JSON payload into individual columns.
- Complex nested structures are flattened for simplified SQL queries.