Skip to main content
InterviewHubPRO
Section Overview
Q49

Question 49 of 50

Part 3: Enterprise FinOps, Disaster Recovery & Scale (25 - 35)

98%
Google BigQuery (50 Qs)•Part 3: Enterprise FinOps, Disaster Recovery & Scale (25 - 35)

Cost Control Best Practices in BigQuery: Dry-run, maximum bytes billed, and partition filter enforcement.

senior LevelCode ExamplebigqueryEnterprise FinOps

In Simple Words: Preventing developer queries from running multi-thousand-dollar scans:

  1. Dry-Run Validation: Call the API with dryRun=true or inspect the query validator in the console to verify exact byte scan volume before running.
  2. Maximum Bytes Billed: Set maximum_bytes_billed = 107374182400 (100 GB). If a query's scan estimate exceeds 100 GB, it aborts instantly without incurring billing.
  3. Enforce Partition Filters:
    sql
    ALTER TABLE `analytics.events` SET OPTIONS (require_partition_filter = true);
    
    Any query without a WHERE _PARTITIONDATE = ... is automatically rejected by the compiler.