Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Machine Learning Engineer practice bank has an additional 974 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your ML engineering team is migrating a daily batch feature-engineering pipeline from an on-premises Apache Hadoop and Spark cluster to Google Cloud. The pipeline processes 40 TB of Parquet files using PySpark, Spark SQL, and custom Scala UDFs compiled into JAR libraries, currently relying on HDFS for intermediate state before loading aggregated features into BigQuery.
Your target architecture must meet the following requirements:
Which preprocessing approach should you implement?
Dataflow is Google Cloud's fully managed, serverless execution engine for Apache Beam pipelines. It unifies batch and streaming data processing into a single Directed Acyclic Graph (DAG) programming model, automatically handling horizontal autoscaling, dynamic work rebalancing, straggler mitigation, and resource right fitting across CPU and GPU workers without cluster administration.
PCollection objects, PTransform operations, and DoFn processing functions rather than Spark DataFrames or Spark SQL. Migrating a complex PySpark codebase requires rewriting every transformation stage.MLTransform for feature scaling and embeddings and RunInference for batch or real-time model scoring with PyTorch, TensorFlow, and scikit-learn.The team were building a greenfield feature-engineering pipeline, needed unified batch and real-time streaming ingestion from Pub/Sub, or wanted to integrate C++ binaries or real-time RunInference model scoring into a single serverless DAG.
A long-living persistent cluster on Managed Service for Apache Spark provisions a shared, continuously running Compute Engine cluster with Hadoop Distributed File System (HDFS) storage attached to worker nodes. Even with high-availability mode enabled to tolerate single coordinator node failures, the compute nodes and local HDFS state remain tightly coupled over the cluster's lifetime.
A persistent cluster (ideally still using Cloud Storage rather than HDFS) would only be appropriate if the team ran continuous, low-latency interactive workloads or back-to-back micro-batch jobs where cluster startup latency could not be amortized.
Even when adopting long-living clusters on Google Cloud, architectural best practices strongly recommend offloading storage from HDFS to Cloud Storage or BigQuery so clusters remain stateless and easily replaceable.
Managed Service for Apache Spark (formerly Cloud Dataproc) provides a fully managed Apache Spark and Hadoop runtime on Google Cloud, supporting both ephemeral single-job clusters and serverless Spark execution. In the ephemeral model, a dedicated cluster is provisioned automatically for an individual job and terminated immediately upon completion, separating compute infrastructure from persistent storage.
spark.dynamicAllocation.enabled) and autoscaling secondary workers optimize cluster utilization during heavy 40 TB shuffles.Compared to persistent clusters, ephemeral clusters remove idle costs and HDFS maintenance risks. Compared to Dataflow or BigQuery SQL, Managed Service for Apache Spark preserves existing PySpark and JVM library investments while delivering cloud-native elasticity and low operational overhead.
BigQuery is Google Cloud's serverless, massively parallel processing (MPP) enterprise data warehouse that separates compute (slots) from managed storage. The BigQuery batch SQL translator automates converting SQL dialects such as Spark SQL and HiveQL into GoogleSQL, while BigQuery DataFrames (bigframes.ml) provides a Python pandas- and scikit-learn-compatible API that pushes preprocessing computations down to BigQuery's SQL engine.
bigframes.ml: Adopting BigQuery DataFrames requires refactoring existing PySpark jobs to use bigframes.ml.preprocessing transformers (such as StandardScaler, OneHotEncoder, and ColumnTransformer) and rewriting custom JVM UDFs in SQL or Python remote functions.bigframes DataFrame APIs.The existing pipeline consisted primarily of declarative Spark SQL or HiveQL scripts without compiled Scala/Java UDF dependencies, and the organization wanted to consolidate all data warehousing and SQL-based feature transformations directly inside BigQuery.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated