Decision
The warehouse is read from and written to. All computation happens in a service outside it.
Context
The obvious answer is to push computation to the data as calculation views or stored procedures.
Alternatives, and why not
- Calculation views in the warehouseIt is a shared instance that is already slow and business-critical. Adding my compute to it means my feature's cost lands on every other team, and my feature's regression becomes their outage.
Rationale
Move the data to the compute when the compute is yours and the data store is everyone's. The transfer cost is bounded and predictable; the shared-resource contention is neither.
What it cost
Data transfer on every run, mitigated by reading only the most recent 104 weekly versions and only the columns the statistics actually need.
Outcome
The pipeline can be tuned, retried and scaled without a warehouse change request.