Google PDE: BigQuery Analytics and Warehouse Engineering — Study Guide

Part of the Google Professional Data Engineer — Study Guide. Practice with verified answers in the Google exam hub, or take timed practice tests on ExamRoll.io.

Overview

BigQuery is a serverless, columnar, MPP analytics warehouse that separates storage from compute, providing near-infinite scale, ANSI SQL, and integrated governance. Warehouse engineering on BigQuery balances schema design (partitioning, clustering, denormalization vs normalization, nested records), ingestion patterns (batch loads, streaming, Storage Write API), and workload management (on-demand vs capacity-based editions and reservations). Robust security (authorized views, row/column policies, policy tags) coexists with cost controls and performance tooling to minimize bytes scanned and reduce latency. This section covers core design, operations, and failure modes you must anticipate in production.

Storage and Semantics: Datasets, Tables, Views, and Lake Access

Query Optimization and Workload Management

Ingestion, Federation, and Recovery

Security, Governance, and Cost Control

Practical Problem Scenario

NovaCare Health operates a regional telemedicine platform. A single-table patient_and_visit design supported a pilot, but at 100× scale reports time out, duplicates appear from streaming upserts, and partners require strict data isolation.

Approach:

  1. Redesign the schema and layout

    • Create normalized core tables: patients(patient_id, demographics, updated_at) and visits(visit_id, patient_id, visit_ts, metrics, updated_at).
    • Make visits a partitioned table on DATE(visit_ts), clustered by patient_id and visit_id. Keep small reference dimensions denormalized into visits for dashboard speed.
    • Rationale: Normalizing avoids expensive self-joins and heavy row updates on a single hot table. Partitioning prunes historical scans; clustering co-locates joins and filters on patient_id, reducing shuffle.
  2. Ingest with the Storage Write API and enforce idempotency

    • Use a Dataflow pipeline to parse inbound events, validate, and write to named streams in the Storage Write API with idempotent offsets.
    • Route malformed events to a dead-letter BigQuery table for triage.
    • Rationale: The Storage Write API provides higher throughput, lower latency, and better dedup guarantees than legacy streaming. Dead-lettering preserves visibility into partner data quality issues.
  3. Design for freshness and deduplication in queries

    • For interactive analytics, add a short watermark (for example, 2× observed availability) before querying the latest partition; or filter by _PARTITIONDATE where partition_date <= CURRENT_DATE() to exclude in-flight rows.
    • Use ROW_NUMBER() OVER (PARTITION BY visit_id ORDER BY event_ts DESC) = 1 in views that must tolerate upstream retries.
    • Rationale: Streaming is eventually consistent for a brief interval. Watermarking and window-based dedup protect dashboards from transient gaps and duplicates.
  4. Accelerate common aggregates with materialized views

    • Create partition-aligned MVs over visits for daily KPIs grouped by DATE(visit_ts) and patient cohorts. Ensure predicates are compatible with rewrite.
    • Rationale: MVs reduce latency and scanned bytes for recurring reports; BigQuery rewrites queries to use the MV transparently.
  5. Enforce tenant isolation and fine-grained security

    • Place each partner in a dedicated dataset. Grant least-privilege dataset roles to partner groups.
    • Publish authorized views for shared, cross-partner benchmarks without revealing raw tables.
    • Apply policy tags to PII columns and add row access policies to visits to restrict access by partner_id for internal multi-tenant analytics.
    • Rationale: Dataset-per-tenant segmentation plus authorized views and policy tags enforce least privilege while enabling curated sharing.
  6. Manage workloads with editions, reservations, and autoscaling

    • Purchase capacity in BigQuery editions and create two reservations: etl (Dataflow sinks, scheduled transforms) and bi (ad hoc/reporting). Assign projects accordingly and enable autoscaling to absorb peaks.
    • Schedule ELT queries as batch with clear SLAs; set maximum_bytes_billed for interactive projects.
    • Rationale: Separate reservations prevent ETL from starving BI. Autoscaling accommodates bursty loads without overprovisioning.
  7. Govern cost and observe usage

    • Require filters on visit_ts; reject SELECT * in shared views. Use INFORMATION_SCHEMA.JOBS to detect non-pruned scans and skewed joins.
    • Export BigQuery audit logs to Pub/Sub with a log sink filtered to insert jobs on visits to trigger monitoring alerts for unexpected surges.
    • Rationale: Byte-pruning and column projection control cost; audit logs surface access patterns and anomalies in near real time.
  8. Plan recovery and backfills

    • Enable default table expiration policies that align with compliance and time-travel needs. For large edits, create a snapshot, run changes, and roll back quickly if necessary. Use table clones for dev/test what-if analyses without duplicating storage.
    • Rationale: Snapshots and clones provide fast, space-efficient safety nets; time travel covers small corrective restores.
  9. Integrate in-warehouse ML

    • Store engineered features in partitioned tables and train BigQuery ML classification models for readmission risk. For external models hosted on Vertex AI, create remote models and cache predictions in a clustered table for low-latency joins.
    • Rationale: Keeping ML close to data reduces movement and governance complexity; caching remote inference amortizes latency and cost.

With this design, NovaCare achieves predictable performance under 100× load, strong tenant isolation, and governed costs, while preserving low-latency analytics and reproducible recovery.


Data Storage · All domains · Stream Processing with Dataflow and Apache Beam

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Google →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product