13. Migration manifest¶
A feature store built in DEV eventually needs to land in STAGING and
PROD. The migration manifest turns the lineage graph from
Module 12 into a JSON document you can replay in a target
environment — a portable, declarative bill of materials.
What the manifest contains¶
from tdfs4ds.lineage import (
build_teradata_dependency_graph,
graph_to_migration_manifest,
)
graph = build_teradata_dependency_graph(
sql_query="SELECT * FROM DEV_DB.V_CUSTOMER_360",
)
manifest = graph_to_migration_manifest(graph, filter_database='DEV_DB')
The manifest is a dict with three lists:
| Section | Content |
|---|---|
views |
Every view's name, schema, DDL, and dependency list |
tables |
Source tables with PI and partition columns |
edges |
The directed dependency edges, filtered to the target database |
filter_database='DEV_DB' restricts the export to objects in that schema —
edges that cross the boundary are excluded so the manifest is a self-contained
slice you can apply elsewhere.
Replay it¶
A typical end-to-end migration:
- Source side.
- Target side.
- Re-create the views in dependency order (the manifest already lists them sorted) — for each entry, run its DDL against the target.
- Re-run each process —
tdfs4ds.run(process_id)re-ingests features under the target schema using the same SQL. - Rebuild datasets —
build_dataset(...)from the manifest entries.
Compare two environments¶
Manifests are JSON, so a regular diff highlights drift between environments:
A missing view, a stale partition clause, an extra dependency — all visible in plain text.
Composing with the rest of the training¶
- Module 8 › Partitioning — the manifest preserves
primary_indexandpartition_columnsso PROD ends up partitioned the same way as DEV. - Module 10 › Catalogs and datasets — after
replay, the target catalogs hold the same
PROCESS_IDandDATASET_IDrows, which keeps lineage and documentation consistent across environments. - Module 11 › Logs — the follow-up table is per-environment,
so each replay creates its own
RUN_IDrows in PROD.
Learn more¶
- Migration manifest — full
graph_to_migration_manifestreference and the exact JSON schema. - Dependency graph — the upstream function that built the graph.
That's the end of the training journey. From here, the Concepts section explains the underlying architecture, Configuration covers every knob in detail, and the API reference documents every public function.