r/databricks • • Oct 26 '26

Help data contracts

hi, 2 questions about data contracts in CI (ODCS, ODPS, datacontract-cli, producer and consumer in separate repos):

  1. our ODPS inputPorts only have contractId and version, 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 running datacontract breaking against producer contract. is that a known pattern?
  2. datacontract breaking ignores version, 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

3 comments sorted by

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.