Skip to Content
Puppi

Materializations API

Read one result, its lineage, or move latest.

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

Read one

curl -s \
  -H "Authorization: Bearer <api-key>" \
  "$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.

Lineage

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.

Roll back the data

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

curl -X POST \
  -H "Authorization: Bearer <api-key>" \
  -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 target the engine refuses is 422. The reason is the error field, with detail when the engine sent one. The cases are in Deploy and rollback.

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