EasyDeepLearn

Why partition ML training tables by date?

medium

Answer

  • (1) Prune scans: only read partitions needed for training window (e.g., last 90 days) — 10-100x faster.
  • (2) Incremental compute: only recompute affected date's features.
  • (3) Time-based split for evaluation is trivial.
  • (4) Retention: drop old partitions cheaply.
  • (5) Parallel writes per partition.
  • Common pattern: eventdate=20240115/\mathrm{event}_{\mathrm{date}} = 2024 - 01 - 15 / folders in S3 / GCS.
  • Tools: Delta Lake, Iceberg for transactional table format.
  • Consumer reads via SQL WHERE.
Check yourself — multiple choice
  • Random
  • Prune scans (10-100x faster) + incremental compute + trivial time split + cheap retention + parallel writes; eventdate=YYYYMMDD\mathrm{event}_{\mathrm{date}} = \mathrm{YYYY} - \mathrm{MM} - \mathrm{DD} partitions + Delta/Iceberg transactions
  • Not helpful
  • Just backup

Date partitioning: prune + incremental + split + retention + parallel.

#pipeline#infrastructure

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions