Inspiration

A SQL transformation can complete successfully while silently removing important data. I was inspired by the kind of production failure where an active customer with no orders disappears because of an inner join. Nothing crashes, the schema still looks valid, and the mistake may only be discovered much later.

## What it does

GraphFixture turns DataHub context into an executable proof pipeline.

It reads schemas, lineage, and a business contract from DataHub, generates deterministic relational fixtures that preserve important edge cases, runs a SQL transformation in DuckDB, and verifies whether the business rule survived.

In the included example, every active customer must appear in customer_order_summary, including customers with zero orders. GraphFixture catches the broken inner join, identifies missing customer C-003, produces a minimal reproducer, and confirms that the fixed left join passes.

Live runs use the official DataHub MCP Server for context attestation and write a verified evidence receipt back to DataHub. Results can also be replayed offline without credentials or network access.

## How we built it

GraphFixture is built with Python, FastAPI, DuckDB, the acryl-datahub SDK, and the official DataHub MCP Server.

The verification engine is deterministic and re-runnable. DataHub provides the catalog context, MCP provides the live lineage attestation, DuckDB executes the SQL, and the web interface presents each stage from context to final proof.

Each result contains the seed, SQL digest, generated fixture, contract, lineage, verification result, and minimal reproducer. Live write-back is verified by reading the stored receipt back from DataHub and matching its evidence digest exactly.

## Challenges we ran into

The hardest challenge was generating realistic related data while preserving edge cases such as an active customer with no orders.

I also had to make the evidence content-addressed and stable across replays, ensure that DataHub write-back could be verified rather than merely claimed, and create a hosted demo that remains useful when live DataHub access is unavailable.

## Accomplishments that we're proud of

GraphFixture demonstrates a complete path from DataHub metadata to executable SQL verification and catalog write-back.

It catches a silent data-loss bug, explains exactly why it happened, produces the smallest reproducer, verifies the corrected query, and preserves the result as replayable evidence.

The project also has a genuine local live path using the official DataHub MCP Server, an offline-first hosted demo, automated tests, strict type checking, linting, and verified DataHub receipt write-back.

## What we learned

DataHub metadata becomes much more valuable when it is used as executable context rather than only displayed in a catalog.

Schemas and lineage can define the inputs to a deterministic test, while contracts make business expectations explicit and verifiable. We also learned that a trustworthy result needs an independent replay path, especially when live services or network access may fail.

## What's next for GraphFixture

The next step is to make GraphFixture usable in real development workflows by adding GitHub and CI integration, so a transformation can be verified automatically before it is promoted.

Future versions could support more warehouse dialects, more contract types, richer lineage-aware fixture generation, and reusable DataHub Skills that let other agents request and verify transformation proofs.

Built With

  • acryl-datahub
  • ai-agents
  • data-lineage
  • data-quality
  • datahub
  • datahub-mcp-server
  • developer-tools
  • duckdb
  • fastapi
  • open-source
  • python
  • sql
Share this project:

Updates