Skip to content

Commit

Permalink
Merge pull request #494 from glsdown/add-dropped-fields-primary-key-t…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
b-per authored Sep 12, 2024
2 parents 9b88dc7 + 6922c2d commit dc36243
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions models/marts/tests/fct_missing_primary_key_tests.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
with
with

tests as (
select * from {{ ref('int_model_test_summary') }}
select * from {{ ref('int_model_test_summary') }}
where resource_type in
(
{% for resource_type in var('enforced_primary_key_node_types') %}'{{ resource_type }}'{% if not loop.last %},{% endif %}
Expand All @@ -11,8 +11,13 @@ tests as (

final as (

select
resource_name, is_primary_key_tested, number_of_tests_on_model, number_of_constraints_on_model
select
resource_name,
resource_type,
model_type,
is_primary_key_tested,
number_of_tests_on_model,
number_of_constraints_on_model
from tests
where not(is_primary_key_tested)

Expand Down

0 comments on commit dc36243

Please sign in to comment.