|
1 | 1 | # LinkedIn post — data-contract-validator v1.3.0 |
2 | 2 |
|
3 | | ---- |
4 | | - |
5 | | -A year ago I stood up at the dbt Meetup in Lagos and talked about a problem |
6 | | -I kept running into: nothing checks the seam between your dbt models and the |
7 | | -things that consume them. |
8 | | - |
9 | | -I finally went back and did the work. **data-contract-validator v1.3.0 is out.** |
10 | | - |
11 | | ---- |
12 | | - |
13 | | -**The problem, in one sentence:** |
| 3 | +## ⭐ Primary (short) |
14 | 4 |
|
15 | | -A data engineer renames a column, `dbt run` goes green, and three |
16 | | -repositories away a FastAPI endpoint starts throwing 500s at 2am. |
| 5 | +Your dbt model feeds a HubSpot sync. Someone in Sales renames a property in |
| 6 | +the HubSpot settings page. |
17 | 7 |
|
18 | | -The dbt tests don't know the API exists. The API tests mock the database, so |
19 | | -they don't know the column is gone. The first person who finds out is |
20 | | -whoever is on call. |
| 8 | +Nothing breaks loudly. The sync just quietly starts writing into a field that |
| 9 | +no longer means what it used to — and nobody finds out until a campaign goes |
| 10 | +out against bad data. |
21 | 11 |
|
22 | | -It's the same thing a type checker solves inside one codebase — except these |
23 | | -two sides never compile against each other. |
| 12 | +That's the part of reverse ETL nobody guards. Your dbt tests don't know |
| 13 | +HubSpot exists. HubSpot has no code review, no git history, no PR for |
| 14 | +"renamed a field." The contract between them lives entirely in someone's |
| 15 | +memory. |
24 | 16 |
|
25 | | ---- |
| 17 | +At the dbt Meetup Lagos I talked about why data contracts matter. **This is |
| 18 | +the shipped version of that argument.** |
26 | 19 |
|
27 | | -**What the tool does:** |
| 20 | +**data-contract-validator v1.3.0** now validates CRM destinations, not just |
| 21 | +APIs: |
28 | 22 |
|
29 | | -It reads what your dbt models actually produce, reads what your Pydantic / |
30 | | -SQLModel classes actually promise, and fails the PR when the data side can no |
31 | | -longer satisfy the consumer side. |
| 23 | +```yaml |
| 24 | +target: |
| 25 | + hubspot: |
| 26 | + type: "hubspot" |
| 27 | + object_type: "contacts" |
| 28 | + fields: [email, lifecyclestage, lifetime_value] |
| 29 | +``` |
32 | 30 |
|
33 | 31 | ```bash |
34 | 32 | pip install data-contract-validator |
35 | | -contract-validator init --interactive |
36 | 33 | contract-validator validate |
37 | 34 | ``` |
38 | 35 |
|
39 | | -No schema to hand-write. Nothing to install into your warehouse. It parses |
40 | | -Python with `ast` (nothing is imported or executed) and SQL with a real |
41 | | -parser, not regex. |
42 | | - |
43 | | ---- |
| 36 | +It reads what your dbt models actually produce, reads what the destination |
| 37 | +actually expects, and fails the PR when they've drifted apart. Same check for |
| 38 | +FastAPI/Pydantic services. Now also for the CRM at the end of your reverse |
| 39 | +ETL pipeline. |
44 | 40 |
|
45 | | -**What's new in this release:** |
| 41 | +Also new: branch auto-matching (a dbt PR into `dev` checks against the API |
| 42 | +repo's `dev` branch, zero config), and a pile of false-positive fixes — every |
| 43 | +one of them found by pointing the tool at real schemas and watching it be |
| 44 | +wrong. |
46 | 45 |
|
47 | | -🔗 **Reverse ETL is now covered, not just APIs.** dbt models don't only feed |
48 | | -services — they get synced into HubSpot, and that destination has a schema |
49 | | -too. Except it lives in an admin UI that anyone can edit, with no code review |
50 | | -and no git history. A property renamed in a settings page breaks a sync |
51 | | -exactly like a dropped dbt column does, and nothing in your repo would show |
52 | | -it. Now it's validated the same way. |
| 46 | +If you run dbt next to an API or a CRM sync: point it at your project and |
| 47 | +tell me where it breaks. That feedback is worth more than a star. |
53 | 48 |
|
54 | | -🔀 **Branch auto-matching.** A dbt PR into `dev` now checks against the API |
55 | | -repo's `dev` branch automatically. Each environment validates against its own |
56 | | -counterpart — zero config. |
| 49 | +Salesforce is the obvious next destination. PRs genuinely welcome. |
57 | 50 |
|
58 | | -🎯 **Fewer false positives, which is the whole game.** A check that cries |
59 | | -wolf gets muted, and a muted check is worse than none. Real fixes this cycle: |
60 | | -`bigint` columns no longer false-flag against Python `int` (Python ints are |
61 | | -arbitrary-precision — there's no truncation risk). `SQLModel(table=True)` |
62 | | -classes are no longer silently skipped, which was quietly exempting real, |
63 | | -dbt-backed tables from checking entirely. |
| 51 | +🔗 github.com/OGsiji/data-contract-validator |
| 52 | +📦 `pip install data-contract-validator` |
64 | 53 |
|
65 | | -💡 **"Did you mean?" on renames.** `lifetime_value` → `ltv` isn't a |
66 | | -mechanical transform, so name-matching can't bridge it. The error now names |
67 | | -the closest actual column and the exact config line to add. |
| 54 | +#dbt #DataEngineering #DataContracts #ReverseETL #Analytics #Python #OpenSource |
68 | 55 |
|
69 | 56 | --- |
70 | 57 |
|
71 | | -**Why I think this matters:** |
| 58 | +## Alternate (slightly longer — if you want the origin story in) |
72 | 59 |
|
73 | | -Most teams already gate deploys on unit tests, type checks, and linting. |
74 | | -Almost nobody gates them on the one dependency that's invisible from both |
75 | | -sides of the seam: whether the warehouse still produces what the consumer |
76 | | -promised. |
| 60 | +A year ago I posted about a problem that kept biting me: nothing checks the |
| 61 | +seam between your dbt models and the things that consume them. |
77 | 62 |
|
78 | | -That gap gets discovered in production, by whoever is paged first. |
| 63 | +At the dbt Meetup Lagos I made the case for data contracts. This is the |
| 64 | +shipped version of that argument — and the newest part is the one I think is |
| 65 | +most under-guarded. |
79 | 66 |
|
80 | | ---- |
| 67 | +**Reverse ETL destinations have schemas too.** |
81 | 68 |
|
82 | | -**Every fix in this release came from pointing the tool at real dbt models |
83 | | -and real SQLModel classes and finding it was wrong.** Not hypotheticals — |
84 | | -actual false passes and false alarms, found and fixed. |
| 69 | +Your dbt model syncs into HubSpot. Someone renames a property in a settings |
| 70 | +page. No PR, no review, no git history — and the sync quietly starts writing |
| 71 | +into a field that no longer means what it did yesterday. |
85 | 72 |
|
86 | | -Which is exactly why I'd love more eyes on it. If you run dbt alongside an |
87 | | -API or a reverse-ETL sync, point it at your project and tell me where it's |
88 | | -wrong. That feedback is worth more than a star. |
| 73 | +Your dbt tests don't know HubSpot exists. HubSpot doesn't know your dbt |
| 74 | +project exists. The contract between them lives in someone's memory. |
89 | 75 |
|
90 | | -Especially interested in contributors for: |
91 | | -→ Salesforce (the obvious next destination) |
92 | | -→ Django / SQLAlchemy targets |
93 | | -→ More warehouse type edge cases |
| 76 | +**data-contract-validator v1.3.0** now covers it: |
94 | 77 |
|
95 | | -MIT licensed. 97 tests. Issues and PRs genuinely welcome. |
| 78 | +```bash |
| 79 | +pip install data-contract-validator |
| 80 | +contract-validator init --interactive |
| 81 | +``` |
96 | 82 |
|
97 | | -🔗 github.com/OGsiji/data-contract-validator |
98 | | -📦 pip install data-contract-validator |
| 83 | +It reads what dbt actually produces, reads what the destination actually |
| 84 | +expects — a FastAPI/Pydantic service, or now a HubSpot object — and fails the |
| 85 | +PR when the data side can no longer satisfy the consumer side. |
99 | 86 |
|
100 | | -#dbt #DataEngineering #Analytics #DataContracts #Python #FastAPI #OpenSource #ReverseETL #DataQuality |
| 87 | +A few things I care about in this release: |
101 | 88 |
|
102 | | ---- |
| 89 | +🔗 **CRM targets.** Scoped to the properties your sync actually writes, |
| 90 | +because a stock HubSpot object has 100–400+ of them and comparing against all |
| 91 | +of them is just noise. |
103 | 92 |
|
104 | | -## Shorter variant (if you want something punchier) |
| 93 | +🔀 **Branch auto-matching.** A dbt PR into `dev` validates against the API |
| 94 | +repo's `dev` branch automatically. Each environment checks against its own |
| 95 | +counterpart. |
105 | 96 |
|
106 | | -A year ago I talked about this at the dbt Meetup in Lagos. I finally shipped it. |
| 97 | +🎯 **Fewer false positives — which is the whole game.** A check that cries |
| 98 | +wolf gets muted, and a muted check is worse than none. Real fixes this cycle: |
| 99 | +`bigint` columns no longer false-flag against Python `int`, and |
| 100 | +`SQLModel(table=True)` classes are no longer silently skipped — that one was |
| 101 | +quietly exempting real dbt-backed tables from checking entirely. |
107 | 102 |
|
108 | | -**data-contract-validator v1.3.0** |
| 103 | +Every fix came from pointing it at real dbt models and finding it was wrong. |
| 104 | +Not hypotheticals. |
109 | 105 |
|
110 | | -The problem: a data engineer renames a column, `dbt run` goes green, and |
111 | | -three repos away a FastAPI endpoint starts 500-ing at 2am. dbt's tests don't |
112 | | -know the API exists. The API's tests mock the DB. Nobody finds out until |
113 | | -production does. |
| 106 | +Which is exactly why I want more eyes on it. Point it at your project and |
| 107 | +tell me where it breaks. |
114 | 108 |
|
115 | | -The tool reads what your dbt models actually produce, reads what your |
116 | | -Pydantic/SQLModel classes actually promise, and fails the PR when they've |
117 | | -drifted apart. |
| 109 | +Open for contributors: **Salesforce**, Django/SQLAlchemy targets, warehouse |
| 110 | +type edge cases. MIT licensed, 97 tests. |
118 | 111 |
|
119 | | -New in this release: |
120 | | -🔗 HubSpot — because reverse ETL destinations have schemas too, and theirs |
121 | | -live in an admin UI with no code review and no git history |
122 | | -🔀 Branch auto-matching — a dbt PR into `dev` checks against the API repo's |
123 | | -`dev` branch, no config |
124 | | -🎯 A pile of false-positive fixes, each one found by pointing it at real |
125 | | -schemas and watching it be wrong |
| 112 | +🔗 github.com/OGsiji/data-contract-validator |
126 | 113 |
|
127 | | -```bash |
128 | | -pip install data-contract-validator |
129 | | -contract-validator init --interactive |
130 | | -``` |
| 114 | +#dbt #DataEngineering #DataContracts #ReverseETL #Python #OpenSource |
131 | 115 |
|
132 | | -If you run dbt next to an API or a CRM sync: point it at your project and |
133 | | -tell me where it breaks. MIT, 97 tests, PRs welcome — Salesforce and Django |
134 | | -targets are wide open if anyone wants them. |
| 116 | +--- |
135 | 117 |
|
136 | | -🔗 github.com/OGsiji/data-contract-validator |
| 118 | +## Notes before posting |
137 | 119 |
|
138 | | -#dbt #DataEngineering #DataContracts #Python #OpenSource |
| 120 | +- Tag **David Adejumo** and **dbt Labs Meetup Lagos** if you want the |
| 121 | + organizer/community reach — his recap post is recent enough that this reads |
| 122 | + as a natural follow-up. |
| 123 | +- Worth tagging co-speakers **Adedamola Onabanjo** and **Israel Odeajo** only |
| 124 | + if you're framing it as a community thread rather than a project launch. |
| 125 | +- The repo has **no CONTRIBUTING.md** — if this post drives contributors, |
| 126 | + that's the first thing they'll look for. |
0 commit comments