Skip to content

Commit

Permalink
include models_to_exclude in build_model_dependencies recursion
Browse files Browse the repository at this point in the history
This allows the dependency detection to short-circuit mocking CTEs
when appropriate
  • Loading branch information
David E Worth authored and psousa50 committed Jun 17, 2023
1 parent 9cefa40 commit 405b60b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/sql_builders.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{% set node = dbt_unit_testing.node_by_id(node_id) %}
{% if node.unique_id not in models_to_exclude %}
{% if node.resource_type in ('model','snapshot') and build_full_lineage %}
{% set child_model_dependencies = dbt_unit_testing.build_model_dependencies(node) %}
{% set child_model_dependencies = dbt_unit_testing.build_model_dependencies(node, models_to_exclude, build_full_lineage) %}
{% for dependency_node_id in child_model_dependencies %}
{{ model_dependencies.append(dependency_node_id) }}
{% endfor %}
Expand Down

0 comments on commit 405b60b

Please sign in to comment.