Skip to content

Commit

Permalink
Need to exclude dynamic tables from constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dflippo committed Jul 26, 2024
1 parent b3eab1b commit a0dbf31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/create_constraints.sql
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
{#- Find the table models that are referenced by this test. -#}
{%- for table_node in test_model.depends_on.nodes -%}
{%- for node in graph.nodes.values() | selectattr("unique_id", "equalto", table_node)
if node.config.get("materialized", "other") not in ("view", "ephemeral")
if node.config.get("materialized", "other") not in ("view", "ephemeral", "dynamic_table")
and ( node.resource_type in ("model", "snapshot", "seed")
or ( node.resource_type == "source" and var('dbt_constraints_sources_enabled', false)
and ( ( var('dbt_constraints_sources_pk_enabled', false) and test_name in("primary_key") )
Expand Down

0 comments on commit a0dbf31

Please sign in to comment.