fivetran / dbt_hubspot

Data models for Hubspot built using dbt.
https://fivetran.github.io/dbt_hubspot/
Apache License 2.0
33 stars 38 forks source link

bug/email-metrics-variable #105

Closed fivetran-catfritz closed 1 year ago

fivetran-catfritz commented 1 year ago

PR Overview

This PR will address the following Issue/Feature:

102

This PR will result in the following new package version:

v0.9.1 - This is non-breaking as it will not affect model outputs.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR: The models listed below generate metrics by iterating through a list of fields:

This list of metrics is set by default, which means that some of the values in this default list may not exist in upstream tables if their sources are disabled. This can result in a run error.

To address this issue, I created a macro that checks for the presence of these extra columns and removes them from the list. Note that the default list has been moved to the macro to remove setting the variable within dbt_project.yml to avoid any potential conflicts with a user's dbt_project.yml.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

Before marking this PR as "ready for review" the following have been applied:

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

Standard Updates

Please acknowledge that your PR contains the following standard updates:

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

If you had to summarize this PR in an emoji, which would it be?

🚜