Choose retention and expiration at the correct boundary
A telemetry table receives new rows every day but retains only a fixed period of history.
Choose retention and expiration at the correct boundary
A telemetry table receives new rows every day but retains only a fixed period of history. An archive of source objects has a different recovery target. Choose policies separately for the live partitions and the archived files.
The recording distinguishes expiration of old BigQuery partitions from expiration of the whole table while ingestion continues.
Work through the decision
Archived monthly files are read every week for a new dashboard. Does the original cold-storage decision still hold?
Check your reasoning
Recalculate total storage plus retrieval charges under observed access and minimum durations. Keep the required retention, but consider a separate frequently accessed analytical copy or a warmer object class.
Decisions and tradeoffs
- Partition expiration
- Expire each eligible time partition by age while keeping the table available for new data. Check the partitioning column and policy horizon.
- Table expiration
- A table-level expiration removes the table at its expiration time, which fits a disposable staging table with a fixed lifetime.
- Cloud Storage lifecycle rule
- Use eligible object conditions to change storage class or delete objects, accounting for retention protections and execution timing.
- Archive storage class
- Evaluate very infrequent reads, minimum storage duration and retrieval charges before choosing the coldest class.
Work out which partition expires
Consider daily time-unit partitions with a three-day expiration. The partition beginning May 1 at 00:00 UTC becomes eligible to expire on May 4 at 00:00 UTC. Inserting a record late into that partition does not grant it three fresh days. Check the partition time, table-level expiration and applicable retention requirements before promising how long users can query that record.
Practice each guide skill
Work through these exercises in the order of the published guide. The checklist numbers are local references.
- Compare Standard, Nearline, Coldline and Archive using access frequency, retrieval charges and minimum storage durations.
- Configure an age-based object rule and a BigQuery partition expiration policy separately. Verify what disappears and what remains available for new writes.
- Compare a low-access object archive with keeping historical analytical data in its warehouse. Include retrieval time, legal retention and read costs.
Official objectives for this lesson
Related lesson · Separate archival, expiry and recovery
Choose retention and expiration at the correct boundary quiz
Answer 3 questions. Check each answer for an explanation.