Merged PR 2760: Adding latest_date_is_yesterday test
# Description Adds a new dbt test that will fail if the maximum date of a given column is different from yesterday. It uses `current_date`. Additionally, I changed the test `kpis_global_metrics_outlier_detection` on the name of the parameter `detector_strength` to `detector_tolerance`, as a higher value of the parameter indicates that will be less likely to raise an alert. Verified in local that tests passes if the execution is normal. Verified in local that the tests fails if manually deleting the latest date in the table. # Checklist - Does not apply - [ ] The edited models and dependants run properly with production data. - [ ] The edited models are sufficiently documented. - [ ] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #20824
This commit is contained in:
commit
599f00093e
3 changed files with 21 additions and 5 deletions
|
|
@ -362,6 +362,7 @@ models:
|
|||
It comes from int_dates_mtd logic.
|
||||
tests:
|
||||
- not_null
|
||||
- latest_date_is_yesterday
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
|
|
@ -461,7 +462,8 @@ models:
|
|||
description: The last day of the month or yesterday for historic metrics.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- latest_date_is_yesterday
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: Id of the deal associated to the host.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue