Data Engineer interview question

How do you control data warehouse costs?

Control warehouse cost by attributing spend to teams and workloads, pruning partitions, selecting only needed columns, reducing repeated scans, materializing reused results, sizing compute, scheduling work, and setting budgets and alerts.

Direct answer

What a strong answer covers

How it works

Warehouse cost is controlled by first making it visible: every query and job is tagged with a team and a purpose so spend has an owner. The biggest levers are then usually obvious: dashboards that scan whole tables on every refresh, transformations that rebuild everything instead of incrementally, queries that select every column, and compute that runs at full size overnight. Partition pruning, incremental models, materialised results for repeated reads, right-sized and auto-suspending compute, and scheduled rather than continuous refreshes bring spend down, and budgets with alerts per team keep it there.

Example

Cost attribution showed one BI dashboard responsible for 30 percent of monthly spend because it refreshed every five minutes with a query scanning two years of events. Adding a date filter and a materialised daily aggregate cut that to under 2 percent. A per-team budget with an alert at 80 percent caught a runaway backfill the following month before it doubled the bill.

Common mistakes

  • Optimising SQL without knowing which workloads actually cost money.
  • Rebuilding full tables nightly when only yesterday’s partition changed.
  • Leaving compute clusters running without auto-suspend.

A useful answer structure

Answer from your own work.

Do not memorise a script: use only examples you can explain honestly in follow-up questions.

Practise this answer with MiraHint

Open the desktop workspace and rehearse a clear answer in your own words.

Download MiraHint
Data Engineer interview questions