add is_incremental as additional example of when you will need to force dependencies #5547
Labels
content
Improvements or additions to content
improvement
Use this when an area of the docs needs improvement as it's currently unclear
Contributions
Link to the page on docs.getdbt.com requiring updates
https://docs.getdbt.com/reference/dbt-jinja-functions/ref#forcing-dependencies
What part(s) of the page would you like to see updated?
We already have an example for when you need to force dependencies - a model that only has a macro.
Let's also add an example for when references are wrapped in the
is_incremental()
macro - see slack thread.Dependencies nested in the
is_incremental
macro will not show up in lineage, so will need to force dependencies in that case.Example
If you have an incremental model that includes a snippet like below, then you will not be able to see the
source('raw', 'orders')
upstream dependency in the lineage.This is because the
is_incremental
macro will always return false at parse time, so anything buried inside that will not be available to parsing, so will not be added todepends_on
.So in this case, you'd need to do force a dependency outside of the
is_incremental()
conditional like this instead:The text was updated successfully, but these errors were encountered: