Validate representative data locally
Run schemas and quality rules with Polars or DuckDB before paying the startup cost of a remote Spark environment.
Standardise ingestion, transformation, quality checks and materialisation with executable data contracts. Validate locally, check contract changes in CI, and run them with Polars, DuckDB or Spark.
# Business expectations as code model: fields: - name: order_id type: integer required: true - name: amount type: float required: true quality: row_rules: - name: positive_amount sql: "amount > 0"
Stop rebuilding the same controls in every pipeline. LakeLogic turns version-controlled contracts into executable validation, quarantine and materialization behaviour while complex transformations remain normal Python or SQL.
Polars and DuckDB are included. Add the Spark extra when you need distributed lakehouse execution.
pip install lakelogicpip install "lakelogic[spark]"Run schemas and quality rules with Polars or DuckDB before paying the startup cost of a remote Spark environment.
Use configured gates to identify breaking schemas, missing PII declarations and lineage changes before deployment. Some gates require comparison context.
Separate accepted and failed records, preserve diagnostic context, and stop downstream work when dataset-level thresholds are breached.
Engine boundaries matter. The contract model is shared, but engines and catalog combinations are not identical. Review the capability matrix before choosing Spark, Polars, DuckDB, Delta or Iceberg.
RideFlow is a fictional business used to demonstrate domain-owned data products on Databricks Unity Catalog, with the same contracts also running on Microsoft Fabric and Snowflake. The repository shows contracts, Bronze–Silver–Gold flows, quarantine, lineage, SCD Type 2 and cross-domain dependencies.
Independent domain products use common contract machinery without claiming that YAML alone creates organisational ownership or platform governance.
infer_contract() can inspect a supported file or table sample and return a draft with fields, types and suggested rules. The draft remains reviewable YAML—not an invisible production decision.
PII detection and AI-assisted descriptions are optional capabilities with additional dependencies or configured providers.
from lakelogic import infer_contract draft = infer_contract( "data/orders.csv", title="Orders Bronze", suggest_rules=True, ) draft.show() draft.save("contracts/orders.yaml")
Put schemas, quality rules, ownership metadata and service expectations beside the code that produces the dataset.
Reuse contract machinery across teams while domains retain responsibility for business meaning and product changes.
Let AI assist with drafts or proposed changes, then use explicit contracts, review and runtime gates to control what executes.
Where serverless Spark, Polars, DuckDB, dbt and Ibis fit, and one definition of the rules across engines.
Read → ReliabilityStop, drop or quarantine: how to choose per table, and the work quarantine still leaves you.
Read → ContractsSchema tools check values too. The gap is what happens to a bad row or a new column.
Read →Open the quickstart, inspect the accepted and failed records, then decide whether LakeLogic fits your pipeline.
Designing, reviewing and monitoring contracts across teams? The LakeLogic platform is built on Core.