appspace / appspace/kwwhat

[Audit] Add primary key tests to dim_dates

Đang mở
#101 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
kwwhat-audit
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
14
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Context

`dim_dates` has no `not_null` or `unique` data test on `date_day` / `date_id`. The MetricFlow `granularity: day` config is not a data quality assertion — it tells the semantic layer how to interpret the time column, but it does not verify that the column contains no duplicates or nulls.

A date dimension with duplicate or null rows will cause fan-out in any fact-to-dim join that touches the time spine, silently inflating every time-series metric in the project.

This is a small, standalone fix but its blast radius if left unaddressed is large.

## Acceptance criteria

- [ ] `date_day` (or `date_id`, whichever is the primary key) has a `not_null` test
- [ ] `date_day` (or `date_id`) has a `unique` test
- [ ] If both `date_day` and `date_id` exist, it is clear in the column docs which one is the primary key and only the primary key column has the uniqueness test
- [ ] `dbt test --select dim_dates` passes with no failures
- [ ] No SQL changes to the model are required — tests only

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.