Skip to content

Commit 120826d

Browse files
authored
Update README.md
1 parent 9d25aa9 commit 120826d

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,37 @@ It shows how each model in the pipeline is derived from raw external source tabl
165165
- Defined column-level tests using `schema.yml` (e.g., `not_null`, `unique`)
166166

167167
### 4.6 Testing & Documentation
168-
- Added `schema.yml` for column-level tests (`not_null`, `unique`)
169-
- Used `dbt test`, `dbt docs generate`, `dbt docs serve`
168+
To ensure data quality and trust in the pipeline, I implemented column-level tests and added documentation using `schema.yml` files in DBT.
169+
DBT allows us to define tests and metadata **alongside our models** — all inside YAML. These tests run automatically using `dbt test`.
170+
171+
#### ✅ Why I Used `schema.yml`:
172+
173+
- To enforce data integrity on critical columns (`not_null`, `unique`)
174+
- To validate raw data coming from external sources
175+
- To document model and column purposes using DBT's built-in documentation system
176+
- To support CI/CD by catching schema or data issues automatically in GitHub Actions
177+
178+
---
179+
180+
#### 🧪 Sample Test Configuration
181+
182+
Here’s an example from `schema.yml`:
183+
184+
```yaml
185+
version: 2
186+
187+
models:
188+
- name: high_claim_patients
189+
description: "Identifies patients with total claim amounts above a threshold"
190+
columns:
191+
- name: patient_id
192+
tests:
193+
- unique
194+
- not_null
195+
- name: total_claim_amount
196+
tests:
197+
- not_null
198+
```
170199
171200
### 4.7 CI/CD with GitHub Actions
172201
- `ci.yml`: runs `dbt test` on pull requests

0 commit comments

Comments
 (0)