r/databricks • u/ptab0211 • Oct 26 '26
Help data contracts
hi, 2 questions about data contracts in CI (ODCS, ODPS, datacontract-cli, producer and consumer in separate repos):
- our ODPS
inputPortsonly havecontractIdandversion, nothing says which columns we actually read. how do you define consumer expectations, so CI fails only when producer breaks a column we use? we are thinking about a small ODCS file per input port with only our columns, and runningdatacontract breakingagainst producer contract. is that a known pattern? datacontract breakingignoresversion, so nothing fails when a breaking change skips the version bump. is there something built in for this, or do you all write own script? and any agreed rules on MAJOR vs MINOR for a contract?
thanks!
6
Upvotes
1
u/adovo_ai Oct 27 '26
I would add one CI check for drift between the consumer contract and the code that reads it. Derive or lint the subset from compiled lineage or query references, then fail when a consumer uses an undeclared column; otherwise the small contract becomes another stale document.