Spark · medium · ~12 min
The orders fact table is partitioned by order_date. The BI extract filters to the last 7 days — but not with literals: the date list comes from joining a small reporting_windows control table. Since that 'config-driven' refactor, the job scans all 6 years of partitions. Static pruning can't see through a join... but Spark has a tool for exactly this.
order_date
reporting_windows