Closed moseleyi closed 1 year ago
Hi @moseleyi thanks so much for opening this issue!
Luckily there is a quick fix for you to get the ticket models created in your next run. You can simple set the hubspot_service_enabled
variable to be true
(it is false
by default).
vars:
hubspot_service_enabled: true
While this is a quick fix, we did not do a good job documenting in the README that this variable is used for the ticket models. I noticed you are open to creating a PR! This would be a great documentation update PR if you are willing to tackle it. I would recommend we simply adjust our wording in the Disable Models section to explicitly state that this variable is used for the ticket models. Similarly, we would want to make the same adjustment in our dbt_hubspot package to be consistent with the documentation.
Let me know if you would be interested in addressing this PR. Otherwise, our team will be able to address this in our next sprint. Additionally, please let me know if setting the variable fixes your initial problem, if not we will want to look more into that 😄
Hi,
I added hubspot_service_enabled: true
like you suggested but now I'm getting this error:
06:42:07 Database Error in model stg_hubspot__ticket_deal_tmp (models/tmp/stg_hubspot__ticket_deal_tmp.sql)
06:42:07 002003 (42S02): SQL compilation error:
06:42:07 Object 'FIVETRAN.HUBSPOT.TICKET_DEAL' does not exist or not authorized.
06:42:07 compiled SQL at target/run/hubspot_source/models/tmp/stg_hubspot__ticket_deal_tmp.sql
I'm guessing it's because we never used the connection between tickets and deals but it shouldn't stop the package from creating basic ticket models, that are independent of Deals, should it?
Hi @moseleyi -- can you confirm that the ticket_deal
table doesn't exist in your warehouse? if that's indeed the case, I am thinking we should introduce a hubspot_ticket_deal_enabled
variable to disable its corresponding models
Fivetran does have it selected but the table isn't built, which I'm guessing suggests that it hasn't been used in Hubspot. Probably because when we used tickets, we never used to join them with Deals.
hey @moseleyi i've added a hubspot_ticket_deal_enabled
variable that's false by default, this should let you just bypass these models since you don't have the ticket_deal
source table (which most people don't)
if you'd like to try it out:
packages:
- git: https://github.com/fivetran/dbt_hubspot_source.git
revision: feature/disable-ticket-deal
warn-unpinned: false
hmm is this not going to clash with the fivetran/hubspot package since it already has a hubspot_source dependency?
ah yeah -- lemme change the hubspot bugfix/deleted-stages
branch to refer to this feature/disable-ticket-deal
branch of the source package, so you can test both with that one package reference
ok the transform package should reference this branch, so you can remove the dbt_hubspot_source
package reference from your packages.yml
I ran the dbt deps
and I have this:
hubspot_service_enabled: true
hubspot_ticket_deal_enabled: false
And the ticket deal doesn't show an error anymore. What tables should I see for tickets? I can see the stg_
views but not the ticket-related tables
like no ticket-related staging models are showing up? that would mean it's not capturing that you have the hubspot_service_enabled
var set to true 🤔
STaging views are created:
but no actual ticket-related materialised tables
ah by ticket-related materialised tables
do you mean transform models? if so, the transform package actually doesn't do anything with tickets -- the source package just creates staging models for them
or rather do you mean you'd want these views materialized as tables?
Ahh okay, I thought tables would also be built automatically like for others but I see it's not in the hubspot package
Closing this issue as it has since been resolved.
Is there an existing issue for this?
Describe the issue
Company, Deal, Email, Engagement, and Owner staging tables are created fine but the Ticket tables are missing. Do they have to be enabled specifically?
Relevant error log or model output
No response
Expected behavior
Stg views defined in dbt_project.yml are available:
dbt Project configurations
vars: hubspot_source: hubspot_database: FIVETRAN hubspot_schema: hubspot hubspot_email_event_print_enabled: false hubspot_email_event_forward_enabled: false hubspot_contact_merge_audit_enabled: true hubspot__pass_through_all_columns: true
Package versions
packages:
What database are you using dbt with?
snowflake
dbt Version
1.2
Additional Context
No response
Are you willing to open a PR to help address this issue?