This PR does a couple things that important to call out:
This package adds the new usage_cost source to the package. This source table will take the place of the credits_used model.
However, the usage_cost model is not yet rolled out to all Fivetran Log users as this only is relevant for individuals on the new pricing model.
Therefore, this PR incorporates some pretty unique logic to check and see if the user has the usage_cost source table within their schema using the does_table_exist() macro.
I am not sold on the name of the macro at the moment and will plan to move this to fivetran_utils.
When running the stg_fivetran_log__credits_used (name will most likely change) model, the macro is called and used to update the fivetran_log__usage_pricing variable. The variable will be true if the usage_cost source is identified. If not, the variable will be false.
If the variable is true then the model will run leveraging the usage_cost source. Otherwise, the credits_used source will be used.
Downstream models and yml docs were updated to account for these changes.
Did you update the CHANGELOG?
[ ] Yes
Does this PR introduce a breaking change?
[ ] Yes (please provide breaking change details below.)
[x] No (please provide an explanation as to how the change is non-breaking below.)
Weirdly enough I do not believe this will be a breaking change... but maybe we should make it breaking as it will be a big update?
Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)
[ ] Yes
Is this PR in response to a previously created Bug or Feature Request
[ ] Yes, Issue/Feature [link bug/feature number here]
[X] No
How did you test the PR changes?
[ ] CircleCi
[X] Local (please provide additional testing details below)
Select which warehouse(s) were used to test the PR
FYI Seed data and integration tests have not been added yet. They need to be added before moving out of draft
[ ] BigQuery
[ ] Redshift
[ ] Snowflake
[ ] Postgres
[ ] Databricks
[ ] Other (provide details below)
Provide an emoji that best describes your current mood
🤯
**Feedback**
We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next.
Are you a current Fivetran customer?
Fivetran created PR
What change(s) does this PR introduce?
This PR does a couple things that important to call out:
usage_cost
source to the package. This source table will take the place of thecredits_used
model.usage_cost
model is not yet rolled out to all Fivetran Log users as this only is relevant for individuals on the new pricing model.usage_cost
source table within their schema using thedoes_table_exist()
macro.fivetran_utils
.stg_fivetran_log__credits_used
(name will most likely change) model, the macro is called and used to update thefivetran_log__usage_pricing
variable. The variable will betrue
if theusage_cost
source is identified. If not, the variable will befalse
.usage_cost
source. Otherwise, thecredits_used
source will be used.Did you update the CHANGELOG?
Does this PR introduce a breaking change?
Weirdly enough I do not believe this will be a breaking change... but maybe we should make it breaking as it will be a big update?
Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)
Is this PR in response to a previously created Bug or Feature Request
How did you test the PR changes?
Select which warehouse(s) were used to test the PR
FYI Seed data and integration tests have not been added yet. They need to be added before moving out of draft
Provide an emoji that best describes your current mood
🤯 **Feedback** We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next.