Deprecation and Ownership

Concepts covered: Pipeline Monitoring

A pipeline without an owner keeps running and keeps costing, and nobody has the authority to change or stop it. Ownership by a named person ends the day that person changes teams. Assign each pipeline to a team, and record it where tooling can read it, so lineage, alert routing and the cost rollup all point at the same name.

An ownership record tooling can read

Schema
  • pipelines: pipeline_id bigint PK, name varchar, owner_team_id bigint FK, tier integer, business_sponsor varchar, review_by date, status varchar
  • teams: team_id bigint PK, name varchar, oncall_rotation varchar, escalation_channel varchar
  • consumers: consumer_id bigint PK, pipeline_id bigint FK, consumer_name varchar, consumer_team_id bigint FK, declared_sla varchar
  • pipelines.owner_team_id references teams.team_id (N:1)
  • consumers.pipeline_id references pipelines.pipeline_id (N:1)
  • consumers.consumer_team_id references teams.team_id (N:1)

What each field decides

When a team dissolves, its pipelines move to the team that owns the largest consumer. With no consumer team to take them, they go to the platform team with 90 days to find an owner or start deprecation. A pipeline with neither an owner nor a consumer goes straight to phase 1.

A tier 2 pipeline's owner team was dissolved last week. Its output has 2 registered consumers, and the larger one belongs to the growth team. What does the ownership model do?

Deprecation in 5 phases

PhaseWhenWhat happensExit condition
Phase 1: AnnounceWeek 1Find every reader from lineage and 90 days of query logs; publish the removal date and the replacementEvery reader notified by name
Phase 2: FreezeWeek 1 to deletionNo new consumers or columns; metadata marks the table deprecatedFreeze enforced in access rules
Phase 3: MigrateWeeks 2 to 10Owner helps each reader move and tracks who remainsRemaining list empty or escalated
Phase 4: BrownoutWeeks 10 to 12Revoke read access for set windows: 1 hour, then 1 dayNo new complaints in the last window
Phase 5: DeleteWeek 13Stop the schedule, keep a final snapshot for the retention period, remove the code, drop the dataSchedule, code and storage gone
SELECT
  user_name,
  count(*) AS queries,
  max(query_start) AS last_read
FROM ops.query_log
WHERE contains(referenced_tables, 'analytics.legacy_sessions')
  AND query_start >= current_timestamp - INTERVAL '90' DAY
GROUP BY
  user_name
ORDER BY
  last_read DESC

Lineage shows declared dependencies, and the query log shows people. A notebook export, a spreadsheet connector and a colleague's ad hoc query appear in the log and in no lineage graph. Run the query in phase 1 and again before phase 4: a name in the second result that was missing from the first is a consumer the freeze failed to stop.

Brownouts exist because some readers never see announcements. A 1-hour revocation on a Tuesday afternoon makes a hidden reader's job fail while the table still exists and restoring access takes a minute. Found during a brownout, a hidden reader costs an hour. Found after deletion, it costs a restore from the final snapshot, if the retention period has not run out.

Do
  • Name the replacement in the announcement, or say why there is none
  • Count readers from query logs as well as lineage
  • Brown out in growing windows before deleting
  • Keep a final snapshot through the retention period
Avoid
  • Delete on the announced date while readers remain
  • Record an individual as the owner
  • Let a deprecated table pick up new consumers
  • Skip the brownout because lineage shows no readers

The phase 1 query-log check found 4 readers. The rerun before brownout finds 5, and the fifth started reading in week 6. Which phase failed?

About this lesson

This section is part of the Pipeline Operations: Advanced lesson on DataDriven, the home of data engineering. Lessons cover SQL, Python, Spark, data modeling and pipeline architecture, and each section pairs its explanation with worked examples and practice you run as you go.