-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] collect_freshness
macro override throws warning in dbt source snapshot-freshness
command
#126
Comments
Hi @aleix-cd thanks for opening this issue. You are correct that this is the cause of the warning. I had opened a branch with this fix, but then ended up not merging it as I thought a later version of dbt-core would resolve the error. It seems that did in case happen, but a warning was added in its place. I think it is time now with this warning to consider rolling out the update for this macro. However, before pushing that change I want to consider if the macro override that we have in Fivetran Utils is even necessary anymore. I believe we added this macro to properly disable sources. However, that has become a feature in dbt for quite a while. I will investigate this in the coming week and share my findings here. Regardless, we will plan to release a new version of fivetran_utils that either makes the suggested update or removes the override entirely. |
Hi @aleix-cd , thanks for taking the time to look into this issue! We did some further investigation and will be following @fivetran-joemarkiewicz 's plan to update the macro in the coming sprint. The collect freshness macro was originally used to override dbt’s default Although dbt's macro does make our |
Hi @aleix-cd Which of our packages are you using? I have made a test branch for fivetran-utils that should fix the issue, and I'd like to make some test branches in those packages for you to try out on your end. |
Hi there @fivetran-catfritz ! We're using |
Thanks so much @aleix-cd! I've made some test branches for fivetran_log and zendesk, though I didn't make one for ad_reporting since it would be a bit involved. You can use the below for your packages:
# - package: fivetran/ad_reporting
# version: [">=1.7.0", "<1.8.0"]
- git: https://github.com/fivetran/dbt_fivetran_log.git
revision: test/collect-freshness
warn-unpinned: false
- git: https://github.com/fivetran/dbt_zendesk.git
revision: test/collect-freshness
warn-unpinned: false |
@fivetran-catfritz any chance you can also apply changes in that branch for |
@aleix-cd I actually may have found an easier way for you to test these changes (full disclosure I am not sure if this will work in dbt cloud but it does locally via dbt core). Can you go your normal route of installing all your packages via packages:
# - package: fivetran/zendesk
# version: [">=0.12.0", "<0.13.0"]
# - package: fivetran/ad_reporting
# version: [">=1.7.0", "<1.8.0"]
- git: https://github.com/fivetran/dbt_fivetran_utils.git
revision: review/collect-freshness-1.4.0-test
warn-unpinned: false Once you have your Let me know if you are able to try this and if it looks good. We are still planning to release by tomorrow or Wednesday, but it would greatly help if you can validate these changes. Thanks 😄 |
Thanks for the workaround, @fivetran-joemarkiewicz ! It did work locally with dbt-core :) Followed your steps, ran |
@aleix-cd Thanks for testing this out! This update is scheduled to be released tomorrow (Nov 1). |
This update has been released on the dbt hub, so closing out this issue. |
When running the
dbt source snapshot-freshness
command, we are getting the following warning:I believe this is due to the fact that the
fivetran_utils
package overrides thecollect_freshness
dbt macro (see this dbt Slack thread as reference: https://getdbt.slack.com/archives/C03SAHKKG2Z/p1683127164993329), and that it is expecting this{{ return(load_result('collect_freshness')) }}
instead of this
{{ return(load_result('collect_freshness').table) }}
This is not blocking us, but it is not very pleasant to get warnings in each
dbt source snapshot-freshness
command since it creates undesired clutter.Am I right in assuming this is the cause of this warning? If so, are there any plans to update the macro in
fivetran_utils
?I actually recreated the macro in our repo, got rid of the
.table
part, and no warnings were raised when I ran thedbt source snapshot-freshness
command.My current dbt versions:
dbt-core==1.6.5
dbt-snowflake==1.6.4
The text was updated successfully, but these errors were encountered: