DATA2TOOL // INTERFACE COMPILER
fixture revision · 99d013c9
DataHub context → governed API

Compile the catalog into code.

Schema, assertions, ownership, tags, glossary terms, and lineage become typed contracts, a bounded read-only endpoint, redaction rules, tests, and provenance.

Interactive compiler plate

Eight source names. Eight safe identifiers.

Select a field to inspect the mapping rule. The two customer keys normalize to the same base name, so each receives a deterministic hash suffix.

DataHub source field
MAP
Generated Python identifier
Select a mapping.
Executable contract

Validate one record

Valid

Governed response

The service projects sensitive columns as the literal marker [REDACTED]. Stored email values are not fetched by the generated read endpoint.

Constraints from assertions

class accepts paid, pending, or refunded. amount is bounded from 0 to 1,000,000.

Read-only by construction

The generated DuckDB reader requires an existing file, caps results at 100, allowlists fields, and parameterizes values.

Reviewable output

Equal canonical snapshots produce byte-identical generated files, keeping pull-request diffs stable.

What this proves

The deterministic snapshot compiles and the included sample validates through generated FastAPI code. Collision handling and PII redaction are exercised by tests.

Fixture boundary

No live DataHub tenant was contacted for this public demo. The MCP transport adapter is implemented against recorded response shapes; no credentials or writes are included.

Reproduce locally

Inspect the generated package

Repository: REPOSITORY_URL_PENDING_PUBLICATION
  1. Clone the public Apache-2.0 repository.
  2. Run python -m venv .venv && .venv/bin/pip install -e '.[dev]'.
  3. Run .venv/bin/pytest -q.
  4. Run PYTHONPATH=src .venv/bin/python scripts/demo.py to compile, validate, query DuckDB, and observe email redaction.