Replies: 2 comments
-
Adding to this idea. When I run the test above, I get a WARNing messgae, but I am not able to see if this WARN occured from 1 gapped record or 100, so it is not super useful on a granular level. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found fail_calc which I believe achieves this. Closing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In DBT Cloud I have written a custom test to compare a dimension and fact table to see if there are gapped records. That test looks like this:
`
-- test for gapped records in dim_loans
{{ config(
severity='warn'
) }}
SELECT COUNT(*)
FROM {{ ref('fact_loan_statistics') }}
WHERE loan_key NOT IN (SELECT loan_key FROM {{ ref('dim_loans') }})
`
Within the config block I wish I was able to modify this test so that the actual numerical count of gapped records is returned in the test error message in the console. Said another way, I want this test to return the COUNT() value to the WARN message in the console.
Beta Was this translation helpful? Give feedback.
All reactions