Skip to content

Materializations

A materialization is one recorded result. These routes read it and move the latest pointer.

Terminal window
curl -s \
-H "Authorization: Bearer $PUPPI_API_TOKEN" \
"$PUPPI_ENGINE_URL/api/v1/materializations/<id>"

data is the row: id, environment_id, asset_id, attempt_id, partition, inputs, storage_ref, observed_schema, stats, cursor_from, cursor_to, checks, quarantined, verified_at, and created_at. state is the derived view: state, is_latest, is_superseded, is_quarantined, and is_orphaned, plus asset_key. inputs_of is one hop upstream, each {materialization_id, asset_key, created_at}. An unknown id is 404 no_such_materialization.

GET /api/v1/materializations/:id/upstream walks inputs transitively and returns the ids:

{"data": ["<upstream-id>"]}

puppi lineage --json calls this route for the asset’s latest materialization.

POST /api/v1/environments/:name/rollbacks moves latest to an earlier materialization. asset_key and materialization_id are required. partition defaults to "".

Terminal window
curl -X POST \
-H "Authorization: Bearer $PUPPI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"asset_key":"core/customer","materialization_id":"<id>"}' \
"$PUPPI_ENGINE_URL/api/v1/environments/hello/rollbacks"
{
"data": {
"rolled_back": {"asset_key": "core/customer", "materialization_id": "<id>"},
"repointed": [],
"rebuilding": [],
"unchanged": [],
"run_id": null
}
}

repointed are downstream assets whose latest moved to a materialization that already matched the new inputs. rebuilding are the assets that need a new run. run_id is that run when there is one. A quarantined target, a target whose data is no longer retained, an append source, an incremental model, a view, and a destination are 422. The reason is the error field, with detail when the engine sent one.

This route does not change the active deployment. Code rollback is activating an older deployment.