LakeLogic
Loading…

How-to

Write a data contract your pipelines enforce

Define a dataset's schema, quality rules and ownership in one contract, review the change, and publish it through a pull request.

Why it matters

When a table's shape and quality rules live only in pipeline code, they are spread across many files and hard to review as one agreement, so a breaking change is often found by the people downstream. A contract states them in one file: the fields, the rules every row must pass, and who owns it. Changes go through review like code.

What you can do

  • Create a contract by hand, with Zeus, or from an existing OLC YAML file.
  • Edit it in a form, in YAML, or both side by side.
  • Add quality rules, transformations and lineage links.
  • Classify personal and confidential fields, and choose how they are masked.
  • See what a change affects before you submit it.
  • Submit the change as a pull request.

How to do it in LakeLogic

  1. Go to Govern → Contracts → Contract Studio.
  2. Open Add a contract and choose Draft one contract with Zeus, Create manually or Import OLC YAML. To bring in contracts that already live in a repository, select Scan repositories.
  3. In the editor, choose a layout: Form, Split or YAML. Required fields are Contract Name, Version, Table Name, Business Domain and System.
  4. Define the Model Fields. For each, you can set PII, Confidential and a masking method (Hash, Redact, Nullify, Partial or Encrypt).
  5. Add rules under Quality Rules (YAML), and logic under Transformations (YAML) and Lineage & Dependencies (YAML). Draft with Zeus can propose fields, rules and transformations for you to review.
  6. Select Impact analysis to see what the change could affect downstream.
  7. Select Save draft. The published contract does not change.
  8. Select Create PR. Review the changes, choose which contracts to include, and create the pull request. Create PR stays disabled while the editor reports unresolved issues. Which Git providers: Create PR opens the pull request on GitHub or Azure DevOps. On GitLab and Bitbucket, LakeLogic pushes the branch but does not open the merge request or track the merge yet, so open it yourself. See Connect your tools.

Drafts, open changes and publishing

A saved draft appears on the contract as an Open change card. It names the draft, says whether it is in a pull request, lists what changed against the published version, and links to the pull request when there is one.

StatusMeaning
Draft, not in a pull request yetSaved, not submitted
In reviewA pull request is open
ApprovedReady to merge
PublishedMerged into the repository. It does not mean deployed or run.

Your standards are checked against the change. See Standards and gates and Approve every contract change with evidence.

What you get

  • A versioned contract with a History tab that compares versions.
  • A pull request with the contract files, reviewed in your own repository.
  • A contract page with Overview, Fields, Quality, Lineage and History tabs.

Good to know

  • Discard draft is offered only while the draft has no pull request. For a contract that was never published, discarding deletes it, and the button says so.
  • If Lakehouse Studio is on for your organisation, Explore draft opens the saved draft on synthetic data. See Design and test a lakehouse.
  • An AI assistant can propose a rule as a draft for a person to approve. See Connect your AI assistant.

Ready to build trusted data products?

See LakeLogic in action.