Google Cloud Professional Data Engineer (PDE) — BigQuery, Dataflow, Pub/Sub, Bigtable & Vertex AI

High-yield Google Cloud PDE flashcards covering BigQuery storage/compute internals (Capacitor, Colossus, Dremel), partitioning and clustering, Authorized Views/RLS/Data Masking, Pub/Sub delivery guarantees, Apache Beam on Dataflow (windows, watermarks, triggers), Bigtable row-key design, Dataproc, Cloud Composer, and Vertex AI.

Category
Multi-Cloud & DevOps Architecture — Microsoft Azure (AZ-104 & AZ-305), Google Cloud (PCA & PDE), Kubernetes (CKA / CKAD) & HashiCorp Terraform Associate
Level
intermediate
Languages
en → en
Cards
32
Markdown
Google Cloud Professional Data Engineer (PDE) — BigQuery, Dataflow, Pub/Sub, Bigtable & Vertex AI (.md)

Flashcards (32)

#Front (Term / Question)Back (Definition / Answer)ExampleMultiple-Choice Options
1In Cloud Dataflow, what problem does 'Hot Key' detection solve, and how does 'Dataflow Shuffle' / 'Streaming Engine' improve performance?Streaming Engine and Dataflow Shuffle offload window state and shuffle buffers from worker VM disks to a managed Google service for fast autoscaling.If a single skewed key (`country = 'US'`) bottlenecks a `GroupByKey` worker, Dataflow's UI flags the Hot Key, and engineers fix it by adding a random key salt (`US#0..9`) or using `Combine.perKey().withHotKeyFanout()`.
  • Streaming Engine moves window state off worker VMs to Google's backend; `withHotKeyFanout` adds an intermediate combiner tier to eliminate hot-key bottlenecks.
  • Streaming Engine and Dataflow Shuffle offload window state and shuffle buffers from worker VM disks to a managed Google service for fast autoscaling.
  • Dataflow Prime further adds vertical memory autoscaling (Rightfitting) and smart diagnostics.
2Why does `LIMIT 10` in a `SELECT * FROM dataset.table LIMIT 10` query NOT reduce the bytes billed in BigQuery on-demand pricing, and what should you do instead?BigQuery bills by total bytes scanned in referenced columns across matching partitions; instead, select specific columns, filter partitions, or use free Table Preview.To inspect sample rows at zero cost, Data Engineers use the BigQuery Console Preview tab, `bq head -n 10 project:dataset.table`, or query a clustered table where block pruning stops early.
  • BigQuery bills by total bytes scanned in referenced columns across matching partitions; instead, select specific columns, filter partitions, or use free Table Preview.
  • `SELECT *` scans every column in full; use explicit column projection, partition/cluster filters, `--dry_run` estimation, or free `bq head` / table preview.
  • Note: On clustered tables, a simple `SELECT ... WHERE cluster_col = X LIMIT N` can short-circuit after scanning initial clustered blocks.
3In Google Cloud Memorystore (for Redis and Memcached), when should a Data or Cloud Architect choose Memorystore for Redis vs. Memorystore for Memcached?Choose Memorystore for Redis when needing persistence, HA replication, Pub/Sub, or sorted sets; choose Memcached for simple volatile multi-threaded string caching.Gaming leaderboards using `ZADD`/`ZRANGE` sorted sets and session stores requiring automatic cross-zone failover use Memorystore for Redis (Standard Tier or Redis Cluster).
  • Choose Memorystore for Redis when needing persistence, HA replication, Pub/Sub, or sorted sets; choose Memcached for simple volatile multi-threaded string caching.
  • Redis = rich data structures (sorted sets, hashes, lists), HA replica failover, and RDB persistence; Memcached = simple volatile horizontal key-value cache.
  • Read Replicas on Memorystore for Redis scale read-heavy caching workloads across zones.
4How does Multi-Cluster Replication in Cloud Bigtable improve availability and read throughput, and what consistency guarantee does it provide?Multi-Cluster Replication replicates writes asynchronously across up to 8 clusters globally, providing eventual consistency—or read-your-writes consistency via a Single-Cluster Application Profile.An application uses a Multi-Cluster Routing Application Profile for high-availability failover of reads, while routing user-profile updates through a Single-Cluster Routing Application Profile for strong read-your-writes.
  • Multi-cluster routing provides automatic failover and higher read throughput (eventual consistency); single-cluster routing without failover provides strong consistency on that cluster.
  • Each cluster in a Bigtable instance can be scaled independently based on regional traffic.
  • Multi-Cluster Replication replicates writes asynchronously across up to 8 clusters globally, providing eventual consistency—or read-your-writes consistency via a Single-Cluster Application Profile.
5How does Google BigQuery decouple storage and compute under the hood using Colossus, Capacitor, Jupiter, and Dremel?BigQuery stores data in Capacitor columnar format on Google's Colossus file system, connected over the petabit Jupiter network to stateless Dremel execution slots.Because storage (Colossus/Capacitor) is completely decoupled from compute (Dremel slots), multiple analytics teams can run concurrent multi-terabyte SQL queries without contending for local disk I/O.
  • Colossus = distributed storage; Capacitor = compressed columnar file format; Jupiter = petabit network fabric; Dremel = distributed SQL query engine.
  • Enables independent scaling of petabyte storage and on-demand or capacity-based (Editions) compute slots.
  • BigQuery stores data in Capacitor columnar format on Google's Colossus file system, connected over the petabit Jupiter network to stateless Dremel execution slots.
6In Vertex AI Feature Store, what is 'Training-Serving Skew' and 'Data Leakage' (Time Travel), and how does Feature Store prevent them?Training-Serving Skew occurs when batch training features differ from online serving; Vertex AI Feature Store unifies definitions and performs point-in-time historical joins.When generating training examples for fraud orders from 6 months ago, Feature Store's point-in-time lookup retrieves each customer's exact rolling 30-day spend as of the historical order timestamp, preventing future data leakage.
  • Training-Serving Skew occurs when batch training features differ from online serving; Vertex AI Feature Store unifies definitions and performs point-in-time historical joins.
  • Provides an Offline Store (BigQuery-backed for batch training + point-in-time historical joins) and an Online Store (Bigtable/Optimized for low-latency serving).
  • Point-in-time lookups prevent data leakage from future timestamps during historical model training.
7Compare Google Cloud Data Fusion, Dataprep by Trifacta, Dataproc, and Dataflow for data processing pipelines.Data Fusion is GUI code-free ETL (CDAP); Dataprep is visual data wrangling; Dataproc runs managed Spark/Hadoop; Dataflow runs serverless Apache Beam batch/streaming.Business analysts visually profile and clean messy CSV files using Dataprep, enterprise teams build drag-and-drop SAP-to-BigQuery connectors in Data Fusion, and data engineers write low-latency streaming pipelines in Dataflow.
  • Data Fusion = GUI enterprise ETL (CDAP on Dataproc); Dataprep = visual data preparation; Dataproc = managed Spark/Hadoop; Dataflow = serverless unified Apache Beam.
  • Data Fusion is GUI code-free ETL (CDAP); Dataprep is visual data wrangling; Dataproc runs managed Spark/Hadoop; Dataflow runs serverless Apache Beam batch/streaming.
  • Cloud Composer (managed Apache Airflow) orchestrates workflows across all of these services.
8When migrating on-premises Apache Spark and Hadoop workloads to Google Cloud Dataproc, what is the recommended cloud-native architecture for storage and cluster lifecycle?Store persistent HDFS data in Cloud Storage (`gs://`) and spin up ephemeral, job-scoped Dataproc clusters (or Dataproc Serverless) that terminate after job completion.Replacing a permanent 24/7 on-premises Hadoop cluster with ephemeral Dataproc Workflow Templates (using Spot Secondary Worker nodes for compute-only scaling) cuts infrastructure costs by 60–80%.
  • Decouple storage (Cloud Storage instead of local HDFS) from compute (ephemeral per-job Dataproc clusters or Dataproc Serverless).
  • Store persistent HDFS data in Cloud Storage (`gs://`) and spin up ephemeral, job-scoped Dataproc clusters (or Dataproc Serverless) that terminate after job completion.
  • If using Spot/Preemptible Secondary Workers in Dataproc, enable Enhanced Flexibility Mode (EFM) so shuffle data stays on primary workers or Cloud Storage.
9In Google Cloud Data Loss Prevention (Sensitive Data Protection / Cloud DLP), compare the four de-identification transformations: Redaction, Masking, Crypto-Hash/Deterministic Encryption, and Format-Preserving Encryption (FPE).Redaction deletes tokens; Masking replaces characters with `*`; Crypto-Hash creates one-way pseudonyms for joins; Format-Preserving Encryption (`FFX`) preserves format and is reversible.When a legacy mainframe requires a 16-digit numeric credit card field and support staff occasionally need to decrypt it with KMS access, engineers apply Cloud DLP Format-Preserving Encryption (`CryptoReplaceFfxFpeConfig`) wrapped by Cloud KMS.
  • Use Deterministic/Crypto-Hash (`CryptoHashConfig`) for irreversible join keys; use Format-Preserving Encryption (FPE) or AES-SIV Deterministic Encryption when reversible de-identification is required.
  • Redaction deletes tokens; Masking replaces characters with `*`; Crypto-Hash creates one-way pseudonyms for joins; Format-Preserving Encryption (`FFX`) preserves format and is reversible.
  • Bucketing and Date Shifting (`DateShiftConfig`) generalize age/salary ranges or shift medical dates while preserving patient interval durations.
10How does Cloud Pub/Sub achieve scalable message delivery across multiple subscribers, and what is the difference between Topics and Subscriptions?Publishers send messages to a Topic; each independent consumer attaches its own Subscription (`Pull`, `Push`, `BigQuery`, or `Cloud Storage`) to receive all messages.For fan-out (`1-to-N`), creating three separate Subscriptions on the `orders` Topic delivers every order to Billing, Fraud Detection, and Analytics; for load balancing (`1-to-1`), multiple workers share one Subscription.
  • Publishers send messages to a Topic; each independent consumer attaches its own Subscription (`Pull`, `Push`, `BigQuery`, or `Cloud Storage`) to receive all messages.
  • Many subscriptions per topic = fan-out (broadcast); many workers on a single subscription = competing consumers (load balancing).
  • Direct BigQuery Subscriptions and Cloud Storage Subscriptions write messages straight to storage without needing a Dataflow pipeline for simple ingestion.
11How do Authorized Views, Row-Level Security (RLS), and Column-Level Security with Dynamic Data Masking work together in BigQuery?Authorized Views share query results without raw table access; Row Access Policies filter rows per user; Policy Tags enforce column ACLs or mask PII.Assigning a Data Catalog Policy Tag with a `SHA256` or `DEFAULT_MASKING_VALUE` masking rule on `ssn` lets analysts run aggregate joins on the table without seeing raw Social Security Numbers.
  • Row-Level Security (`CREATE ROW ACCESS POLICY`) restricts rows via `SESSION_USER()`; Column-Level Security uses Data Catalog Policy Tags + Dynamic Data Masking.
  • Authorized Views share query results without raw table access; Row Access Policies filter rows per user; Policy Tags enforce column ACLs or mask PII.
  • Authorized Views (and Authorized Datasets) grant view-level access without exposing the underlying source dataset.
12In BigQuery Editions (Standard, Enterprise, Enterprise Plus), how do 'Baseline Slots', 'Max Reservation Size' (Autoscaling), and 'Idle Slot Sharing' work?Baseline slots stay allocated continuously; Autoscaling adds slots in multiples of 50 up to Max Reservation Size; Idle Slot Sharing lends unused baseline slots.An ETL reservation with `Baseline = 200` and `Max = 1000` runs steady jobs on 200 committed slots and scales up to 1,000 slots during the 2 AM batch window.
  • Baseline slots provide predictable capacity; Autoscaling scales between Baseline and Max slots based on real-time query demand.
  • Baseline slots stay allocated continuously; Autoscaling adds slots in multiples of 50 up to Max Reservation Size; Idle Slot Sharing lends unused baseline slots.
  • Separate reservations for `ELT_Pipeline`, `BI_Dashboards`, and `Data_Science` isolate workloads while sharing idle baseline slots.
13What is BigQuery Omni, and how does it run analytics on data stored in Amazon S3 or Azure Data Lake Storage Gen2 without copying the raw dataset to Google Cloud?BigQuery Omni runs containerized BigQuery compute inside the target AWS or Azure region, querying S3/ADLS BigLake tables locally and returning only results.Using a cross-cloud `CREATE EXTERNAL TABLE` with a BigQuery Omni connection in `aws-us-east-1`, an analyst joins a 50 TB S3 Parquet table with a native BigQuery table using `LOAD DATA` or cross-cloud transfer.
  • Executes BigQuery Dremel queries locally inside AWS or Azure regions via BigLake external tables to avoid massive cross-cloud egress fees.
  • Only query metadata and final aggregated results (or explicit cross-cloud `CREATE TABLE AS SELECT` exports) cross cloud boundaries.
  • BigQuery Omni runs containerized BigQuery compute inside the target AWS or Azure region, querying S3/ADLS BigLake tables locally and returning only results.
14What is the difference between Feature Attribution Drift and Prediction Drift in Vertex AI Model Monitoring?Training-Serving Skew compares live inputs against the training baseline; Prediction Drift monitors how the distribution of live inputs or predictions shifts over time.When macroeconomic inflation shifts average transaction amounts upward over three months without ground-truth labels being available, Vertex AI Model Monitoring alerts the MLOps team on Input Feature Drift and triggers a retraining pipeline.
  • Training-Serving Skew compares live inputs against the training baseline; Prediction Drift monitors how the distribution of live inputs or predictions shifts over time.
  • Skew = divergence between training distribution and live serving distribution; Drift = gradual change in live production input features or predictions over time.
  • Feature Attribution monitoring uses Explainable AI (Shapley values) to detect when the relative importance of input features changes in production.
15Compare BigQuery's legacy Streaming API (`tabledata.insertAll`) and the modern BigQuery Storage Write API.The Storage Write API uses gRPC streaming with schema validation, higher throughput, lower cost (2 TB/month free), and committed exactly-once delivery semantics.High-volume Dataflow pipelines writing to BigQuery use the Storage Write API (`STORAGE_WRITE_API` method) to achieve exactly-once record commits without paying for deduplication table scans.
  • The Storage Write API uses gRPC streaming with schema validation, higher throughput, lower cost (2 TB/month free), and committed exactly-once delivery semantics.
  • Storage Write API replaces legacy `tabledata.insertAll` with lower cost, gRPC protocol buffers, stream offsets for exactly-once delivery, and ACID stream transactions.
  • Batch loading from Cloud Storage (Avro/Parquet/ORC) into BigQuery using shared slots remains completely free of ingestion charges.
16How do you configure strict message ordering and poison-pill handling in Google Cloud Pub/Sub?Set an `ordering_key` on messages and enable Message Ordering on the subscription for FIFO; configure a Dead-Letter Topic (`max_delivery_attempts` 5–100) for failures.By setting `ordering_key = account_id`, Pub/Sub guarantees that `AccountCreated`, `Deposit`, and `Withdrawal` events for that customer are delivered in exact publish order within the same region.
  • Ordering Keys ensure in-order delivery per key within a region; Dead-Letter Topics capture unacknowledged messages after N failed delivery attempts.
  • Set an `ordering_key` on messages and enable Message Ordering on the subscription for FIFO; configure a Dead-Letter Topic (`max_delivery_attempts` 5–100) for failures.
  • Pub/Sub also supports regional/single-region `Exactly-Once Delivery` on Pull/StreamingPull subscriptions.
17What is the role of Google Cloud Composer (managed Apache Airflow), and why should heavy data transformations NOT run inside Airflow PythonOperators?Cloud Composer orchestrates multi-step DAG workflows across cloud services; running heavy data processing inside Airflow worker pods starves the scheduler and causes timeouts.Best practice in Cloud Composer is to use lightweight operators (`BigQueryInsertJobOperator`, `DataflowStartFlexTemplateOperator`, `DataprocSubmitJobOperator`, or `KubernetesPodOperator`) that trigger external execution engines.
  • Cloud Composer is an orchestrator, not a data-processing engine; delegate heavy compute to BigQuery, Dataflow, Dataproc, or GKE.
  • Cloud Composer orchestrates multi-step DAG workflows across cloud services; running heavy data processing inside Airflow worker pods starves the scheduler and causes timeouts.
  • Cloud Composer 2 runs on GKE Autopilot, automatically scaling Airflow workers based on queue depth.
18How does Google Cloud Datastream work, and what is the reference architecture for near-real-time Change Data Capture (CDC) from Oracle/MySQL/PostgreSQL into BigQuery?Datastream is a serverless CDC service that streams row-level inserts, updates, and deletes directly into BigQuery (via Storage Write API) or Cloud Storage.An enterprise replicates an on-premises Oracle ERP database continuously into BigQuery using Datastream's native BigQuery destination with `max_staleness = 15m`, eliminating custom Debezium/Kafka clusters.
  • Serverless agentless CDC from Oracle, MySQL, PostgreSQL, AlloyDB, and SQL Server directly to BigQuery or Cloud Storage + Dataflow.
  • Datastream is a serverless CDC service that streams row-level inserts, updates, and deletes directly into BigQuery (via Storage Write API) or Cloud Storage.
  • BigQuery Change History (`APPENDS` / `CHANGES` TVF) and `max_staleness` handle low-cost incremental CDC merges natively.
19How does BigQuery Time Travel work, what is its configurable retention window, and how do you recover a table dropped 3 days ago?BigQuery Time Travel retains historical table states for 2 to 7 days, allowing instant recovery via `FOR SYSTEM_TIME AS OF` or `dataset.table@-259200000`.If an ETL script accidentally drops or overwrites `prod.orders`, an engineer restores it within the 7-day window by running `bq cp prod.orders@-3600000 prod.orders_restored` or `CREATE TABLE ... CLONE ... FOR SYSTEM_TIME AS OF ...`.
  • Configurable per dataset from 48 hours (2 days) to 168 hours (7 days), plus an additional 7-day Fail-Safe retention period recoverable by Google Cloud Support.
  • Table Clones (`CREATE TABLE ... CLONE`) and Table Snapshots provide longer-term zero-copy point-in-time backups beyond the 7-day Time Travel window.
  • BigQuery Time Travel retains historical table states for 2 to 7 days, allowing instant recovery via `FOR SYSTEM_TIME AS OF` or `dataset.table@-259200000`.
20When choosing between pre-trained Google Cloud AI APIs (Vision, Speech-to-Text, Natural Language, Document AI, Translation) vs. Vertex AI AutoML vs. Vertex AI Custom Training, what is the decision hierarchy?Prefer Pre-trained AI APIs first (no training data needed); use AutoML or fine-tuning when domain labels exist; use Custom Training for custom architectures.To extract structured invoice line items and W-2 tax fields from scanned PDFs immediately, an engineer uses pre-trained Document AI specialized processors rather than training a custom OCR neural network from scratch.
  • Prefer Pre-trained AI APIs first (no training data needed); use AutoML or fine-tuning when domain labels exist; use Custom Training for custom architectures.
  • 1) Pre-trained APIs / Vertex AI Gemini APIs (fastest, no training data); 2) AutoML / Tuning (domain data, no ML code); 3) Custom Training (custom PyTorch/TF code).
  • Document AI handles structured forms/invoices; Video Intelligence API detects shot changes/objects in video; Cloud Natural Language API extracts entities and sentiment.
21What are BigQuery Materialized Views, and how does 'Smart Tuning' utilize them even when users query the base table directly?Materialized Views precompute and incrementally refresh aggregate SQL queries; Smart Tuning automatically rewrites base-table queries to read from the materialized view when applicable.When BI dashboards query `SELECT region, SUM(revenue) FROM sales GROUP BY region`, BigQuery's optimizer transparently serves the result from `mv_sales_by_region` with zero query modifications.
  • Zero-maintenance precomputed views that combine cached materialized data with real-time deltas from the base table since the last refresh.
  • Materialized Views precompute and incrementally refresh aggregate SQL queries; Smart Tuning automatically rewrites base-table queries to read from the materialized view when applicable.
  • Paired with BigQuery BI Engine (in-memory vectorized caching) for sub-second Looker Studio dashboards.
22How do you diagnose and resolve a 'Slot Contention' or 'Shuffle Quota Exceeded' bottleneck in a complex BigQuery SQL query?Avoid `SELECT *`, filter early before `JOIN`s, avoid mid-query `ORDER BY`, filter skewed `NULL` join keys, and use `APPROX_COUNT_DISTINCT` over exact `COUNT(DISTINCT)`.In the BigQuery Execution Graph, if a `Repartition` stage spills heavily to disk due to `NULL` keys on a `JOIN`, filtering `WHERE join_key IS NOT NULL` before the join eliminates the single-worker shuffle skew.
  • Avoid `SELECT *`, filter early before `JOIN`s, avoid mid-query `ORDER BY`, filter skewed `NULL` join keys, and use `APPROX_COUNT_DISTINCT` over exact `COUNT(DISTINCT)`.
  • Filter NULL/hot keys before joining, push predicates down early, avoid self-joins (use window functions `LAG`/`LEAD` instead), and use approximate aggregation functions.
  • BigQuery Editions autoscaling or splitting Interactive vs. Batch (`BATCH` priority) reservations prevents ad-hoc queries from starving executive dashboards.
23In Apache Beam / Cloud Dataflow, how do Event Time, Processing Time, Watermarks, and Triggers interact to handle late-arriving data?Event Time is when the event occurred; the Watermark tracks event-time completeness; Triggers emit window results at the watermark plus optional early/late firings.Configuring `AfterWatermark.pastEndOfWindow()` with early processing-time firings and late firings emits speculative updates every minute, a main result at the watermark, and updates when late data arrives within `allowedLateness`.
  • Windowing determines WHERE in event time elements are grouped; Watermarks track event-time completeness; Triggers determine WHEN in processing time panes are materialized.
  • Event Time is when the event occurred; the Watermark tracks event-time completeness; Triggers emit window results at the watermark plus optional early/late firings.
  • Accumulating mode includes prior pane values on late firing; Discarding mode emits only the newly arrived delta.
24Compare BigQuery Partitioning and Clustering, including the maximum number of clustering columns and how they reduce query costs.Partitioning divides a table into segments by date/timestamp/integer range; Clustering sorts data within each partition by up to 4 columns in filter priority.A table partitioned by `DATE(event_timestamp)` and clustered by `customer_id, country, event_type` prunes both irrelevant date partitions and non-matching column storage blocks before scanning.
  • 1 partitioning column (time-unit, ingestion time, or integer range, up to 4,000–10,000 partitions) + up to 4 clustering columns.
  • Enabling `require_partition_filter = true` forces every query to include a `WHERE` clause on the partition column to prevent accidental full-table scans.
  • Partitioning divides a table into segments by date/timestamp/integer range; Clustering sorts data within each partition by up to 4 columns in filter priority.
25Which Cloud Bigtable diagnostic tool identifies read/write hotspotting across row-key ranges, and what are the common causes of hotspotting?Bigtable 'Key Visualizer' generates heatmaps of read/write pressure across row-key prefixes over time, revealing hot tablets from skewed keys or narrow scans.A bright horizontal yellow/white band in Key Visualizer indicates a specific row-key range receiving disproportionate traffic, prompting either row-key redesign or enabling multi-cluster replication for read scaling.
  • Key Visualizer plots CPU/ops heatmaps across row keys; note that adding nodes does NOT fix a single-row or monotonic-timestamp write hotspot!
  • Bigtable 'Key Visualizer' generates heatmaps of read/write pressure across row-key prefixes over time, revealing hot tablets from skewed keys or narrow scans.
  • Adding nodes increases aggregate throughput only when traffic is distributed across many tablets.
26What is Google Cloud Dataplex, and how does it unify data governance across BigQuery and Cloud Storage data lakes?Dataplex organizes distributed data across buckets and datasets into logical Lakes, Zones, and Assets with centralized IAM, data quality, and lineage.Instead of managing hundreds of individual IAM policies across 50 Cloud Storage buckets and 30 BigQuery datasets, a Data Governance lead defines security policies and automated Data Quality scans once at the Dataplex Zone level.
  • Organizes multi-project Cloud Storage buckets and BigQuery datasets into Lakes -> Zones -> Assets with unified IAM, automated metadata discovery, and Data Catalog integration.
  • Dataplex organizes distributed data across buckets and datasets into logical Lakes, Zones, and Assets with centralized IAM, data quality, and lineage.
  • Automatically registers discovered Cloud Storage Parquet/Avro tables in BigQuery and Dataproc Metastore.
27When joining a high-volume streaming `PCollection` with a slowly changing small lookup table in Apache Beam / Dataflow, should you use `CoGroupByKey` or a `Side Input`?Use a Broadcast `Side Input` (refreshed periodically via `GenerateSequence` + `View.asSingleton()`) to cache the small lookup table in worker memory without shuffling.Enriching 200,000 clickstream events/sec with a 50 MB currency exchange-rate table uses a `Side Input` inside a `ParDo` `DoFn`, whereas joining two massive streams by key uses `CoGroupByKey`.
  • Side Inputs broadcast small lookup PCollections into `DoFn` workers; `CoGroupByKey` performs a distributed shuffle join across large keyed PCollections.
  • Use a Broadcast `Side Input` (refreshed periodically via `GenerateSequence` + `View.asSingleton()`) to cache the small lookup table in worker memory without shuffling.
  • For slowly changing side inputs, use a global window with a periodic impulse (`GenerateSequence`) and `Latest.globally()`.
28In Apache Beam (running on Google Cloud Dataflow), what are the three core windowing strategies for unbounded streaming PCollections?Fixed Windows (non-overlapping tumbling intervals), Sliding Windows (overlapping intervals with duration and period), and Session Windows (per-key dynamic activity windows with gap duration).Computing a 5-minute moving average updated every 30 seconds uses a Sliding Window (`Duration=5m, Period=30s`), while grouping a user's clickstream until 15 minutes of inactivity uses a Session Window.
  • Fixed (tumbling, e.g., every 1 hour), Sliding (overlapping, e.g., 10-min window every 1 min), and Session (data-driven per key with gap duration).
  • Global Window is the default when no windowing transform is applied.
  • Fixed Windows (non-overlapping tumbling intervals), Sliding Windows (overlapping intervals with duration and period), and Session Windows (per-key dynamic activity windows with gap duration).
29How do you migrate a 500 TB on-premises data warehouse (Teradata, Snowflake, Netezza, Redshift) to Google BigQuery with automated SQL translation and schema transfer?Use the BigQuery Migration Service: run Assessment, translate legacy SQL dialects via Batch/Interactive SQL Translator, and load data via BigQuery Data Transfer Service.For a 500 TB on-premises Teradata migration where network bandwidth is constrained, data engineers transfer raw files via Transfer Appliances or Storage Transfer Service agents to Cloud Storage and load them into BigQuery via DTS.
  • BigQuery Migration Service provides four phases: Assessment, SQL Translation (Teradata/Redshift/Oracle/Snowflake to GoogleSQL), Data Transfer, and Validation.
  • Use the BigQuery Migration Service: run Assessment, translate legacy SQL dialects via Batch/Interactive SQL Translator, and load data via BigQuery Data Transfer Service.
  • For >100 TB over slow WAN links (<1 Gbps), use Google Transfer Appliance physical hardware.
30Which file format (Avro, Parquet, ORC, CSV, JSON) loads fastest into BigQuery for batch ingestion, and which is fastest when querying in-place as an External Table (BigLake)?Compressed Avro loads fastest into native BigQuery storage because blocks split in parallel; columnar Parquet/ORC is fastest for in-place BigLake external queries.When querying petabytes of data remaining in Cloud Storage, Amazon S3, or Azure ADLS Gen2 (via BigQuery Omni), storing files in partitioned Parquet with BigLake tables enables fine-grained column security and predicate pushdown.
  • Fastest native batch load = Avro (row-based binary with embedded schema, splittable even when compressed); fastest external table query = Parquet/ORC (columnar).
  • Compressed Avro loads fastest into native BigQuery storage because blocks split in parallel; columnar Parquet/ORC is fastest for in-place BigLake external queries.
  • Avoid gzip-compressed CSV/JSON for batch loads because gzip streams cannot be split across parallel workers.
31How are rows stored and indexed in Google Cloud Bigtable, and why does a monotonically increasing row key (such as a raw timestamp or sequential ID) cause severe performance degradation?Bigtable sorts rows lexicographically by a single Row Key across tablets; monotonically increasing keys route 100% of writes to a single node (hotspotting).Instead of row key `20261111143000#device123` (which hammers the last tablet), engineers design the row key as `device_type#device123#reverse_timestamp` so writes distribute evenly across all Bigtable nodes.
  • Bigtable has only one index (the Row Key, sorted lexicographically); avoid leading timestamps, sequential IDs, or low-cardinality prefixes that cause single-node hotspotting.
  • Bigtable sorts rows lexicographically by a single Row Key across tablets; monotonically increasing keys route 100% of writes to a single node (hotspotting).
  • Use reverse timestamps (`Long.MAX_VALUE - timestamp`) at the end of a well-distributed prefix when queries need the N most recent rows per entity.
32Compare the three ways to build Machine Learning models on Google Cloud: BigQuery ML (BQML), Vertex AI AutoML, and Vertex AI Custom Training.BigQuery ML trains/serves models in SQL on warehouse data; AutoML builds no-code models automatically; Custom Training runs PyTorch/TensorFlow/XGBoost containers on GPUs/TPUs.Data analysts needing a rapid customer churn baseline model without moving data out of BigQuery execute `CREATE OR REPLACE MODEL dataset.churn_model OPTIONS(model_type='BOOSTED_TREE_CLASSIFIER') AS SELECT ...`.
  • BigQuery ML trains/serves models in SQL on warehouse data; AutoML builds no-code models automatically; Custom Training runs PyTorch/TensorFlow/XGBoost containers on GPUs/TPUs.
  • BQML = fastest SQL-based ML inside BigQuery; AutoML = highest quality no-code model training; Custom Training = full code control over neural architectures and distributed training.
  • BQML models can also be exported to Cloud Storage or registered directly in the Vertex AI Model Registry for low-latency online serving.