Why aren't my HubSpot dbt models being created in my data warehouse?

I’m trying to set up HubSpot dbt models in my Snowflake warehouse but running into issues. I followed the official documentation but the models aren’t showing up after running the commands.

My configuration files:

dbt_project.yml settings:

vars:
    hubspot_database: reporting
    hubspot_schema: hubspot_data

packages.yml configuration:

packages:
  - package: dbt-labs/dbt_utils
    version: [">=1.2.0", "<2.0.0"]
  - package: dbt-labs/codegen
    version: [">=0.12.1", "<0.13.0"]
  - package: fivetran/salesforce_formula_utils
    version: [">=0.9.3", "<0.10.0"]
  - package: fivetran/hubspot
    version: [">=0.18.0", "<0.19.0"]

Steps I took:

  1. Ran dbt deps - this completed successfully and installed all packages including hubspot dependencies
  2. Executed dbt run - this runs but no HubSpot models appear in my warehouse

When I try dbt run -s +hubspot, it executes various other models but skips the HubSpot ones entirely. No error messages appear, which makes debugging difficult.

Has anyone encountered this before? What am I missing in my setup?

I hit the same issue - it’s usually missing source tables. HubSpot’s package needs specific tables like company, contact, deal, etc. in your hubspot_data schema before it’ll build anything. You can test this with dbt run-operation fivetran_utils.source_relation_exists --args '{"relation": "hubspot.company"}' to see if dbt can actually access your sources. If the tables aren’t there or they’re in a different schema than what you configured, dbt just skips the HubSpot models without any error messages. Also double-check that dbt has read permissions on whatever hubspot schema you set in your vars.

Run dbt compile first, then check the compiled SQL files in your target folder. The HubSpot models might compile fine but fail silently when they run - usually happens when you don’t have permissions for certain tables like email_events or engagements.

definitely check your fivetran connection! i had the same prob where dbt ran fine but no hubspot data was there bc fivetran didn’t sync the tables to the schema. hope this helps!

The Problem:

You’re encountering silent failures when running dbt models for your HubSpot integration. dbt run executes without errors, but the HubSpot models don’t appear in your Snowflake warehouse. The dbt run -s +hubspot command also runs other models but skips the HubSpot ones. This indicates a problem with your dbt project configuration or the connection to your HubSpot data source.

:thinking: Understanding the “Why” (The Root Cause):

dbt’s silent failures often stem from inconsistencies between your dbt project configuration (especially variables and paths), the actual location of your HubSpot data in Snowflake, and the permissions granted to your dbt profile. If dbt can’t locate the necessary source tables, it silently skips the models without providing informative error messages. Incorrectly configured variables might lead to dbt looking in the wrong schema or database for the required data. Insufficient permissions will also prevent the models from running successfully.

:gear: Step-by-Step Guide:

  1. Verify Your dbt_project.yml Configuration: This file dictates where dbt expects to find your source data. A common oversight is missing or incorrect hubspot_source_schema. Ensure your configuration is complete and accurate:
vars:
  hubspot_database: reporting
  hubspot_schema: hubspot_data
  hubspot_source_schema: hubspot_data  # Crucial for correct source table identification
  1. Confirm Source Table Existence: Use Snowflake’s show tables command to verify that the tables needed by the HubSpot dbt models actually exist in the schema defined by hubspot_source_schema. The command should be:
show tables in schema reporting.hubspot_data;

Replace reporting.hubspot_data with your actual database and schema if they differ. If tables like company, contact, deal, email_events, or engagements (or others required by the HubSpot package) are missing, your Fivetran or data source sync is likely misconfigured.

  1. Check dbt’s Access: Verify your dbt profile has the necessary read permissions on the hubspot_data schema in Snowflake. If dbt lacks permissions, it will silently skip the models. Review your Snowflake database role settings and ensure the dbt user has the required access.

  2. Inspect Compiled SQL: After running dbt compile, examine the compiled SQL files in your target directory. These files show the actual SQL dbt generates. Look for any errors or inconsistencies within the HubSpot model SQL that might explain the failure. These errors often pinpoint missing tables or permissions issues.

  3. Run Source Existence Check: Use this dbt operation to explicitly test if a source table is accessible:

dbt run-operation fivetran_utils.source_relation_exists --args '{\"relation\": \"hubspot.company\"}'

Replace "hubspot.company" with the actual name of a table known to be used by your HubSpot model if company is not present. A failed check means dbt can’t access the source table, confirming a configuration or permissions issue.

:mag: Common Pitfalls & What to Check Next:

  • Fivetran Sync: Double-check your Fivetran configuration to ensure it’s correctly syncing data to the hubspot_data schema within the reporting database (or your defined equivalents). Any mismatch between Fivetran’s target and your dbt configuration will cause this problem.

  • Variable Names: Pay close attention to the exact names of your variables (hubspot_database, hubspot_schema, hubspot_source_schema). Even minor typos will prevent dbt from finding your source data.

  • Schema Access: Review your Snowflake database roles to ensure that the role used by your dbt profile has sufficient privileges to access the relevant tables and schemas.

:speech_balloon: Still running into issues? Share your (sanitized) config files, the exact command you ran, and any other relevant details. The community is here to help!

Check your profiles.yml connection settings. I hit this exact issue - dbt deps worked fine but models wouldn’t materialize. My profile was pointing to the wrong database role with limited schema access. Also verify your Fivetran connector’s actually syncing to the schema in your vars. Wasted two days on this - Fivetran was pushing HubSpot data to hubspot_raw while my dbt vars looked for hubspot_data. Run show tables in schema reporting.hubspot_data directly in Snowflake to confirm the source tables exist where dbt expects them. The package won’t error out if it can’t find the schema structure - it just silently skips everything.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.