Question bank
CDP Machine Learning Engineer
41 CDP Machine Learning Engineer questions with the correct answer and a written explanation, organised across 4 exam domains.
- 41 questions
- 4 domains
- Foundation level
Question index
Jump straight to any question. Answers and explanations are inline.
Data Engineering for ML
10 questions in this domain
- Question 1Single Choice
Which CDP source is specifically designed for fast analytics on rapidly changing data?
- AApache Hive
- BHDFS
- CApache KuduCorrect answer
- DApache Impala
Why this is the answer
Kudu is built for fast analytics on changing data, offering upserts and low-latency scans.
- Question 2Multiple Select
Which two data extraction strategies are recommended for production ML pipelines in CDP?
- APerforming full table scans daily
- BUsing partition pruning in Hive queriesCorrect answer
- CPulling only incremental changes (delta extraction)Correct answer
- DExtracting raw HDFS files directly with hdfs dfs -get
Why this is the answer
Partition pruning and incremental extraction reduce I/O and resource usage in production ML pipelines.
- Question 3Interactive
Examine the Hive query below. What is missing to make it efficient for large-scale extraction?
- AA partition filter on the 'dt' columnCorrect answer
- BA LIMIT clause
- CA DISTINCT keyword
- DA JOIN with a smaller table
Why this is the answer
Without a partition filter (e.g., WHERE dt='2025-03-01'), Hive scans all partitions, causing poor performance.
- Question 4Single Choice
Which CDP tool is best suited for interactive data profiling and lightweight corrections on Kudu tables?
- AApache Spark
- BApache ImpalaCorrect answer
- CApache Hive
- DApache NiFi
Why this is the answer
Impala offers interactive SQL with low latency and supports UPDATE/DELETE on Kudu tables, ideal for ad hoc data cleaning.
- Question 5Multiple Select
Which two Spark DataFrame methods are commonly used to handle missing values?
- Adropna()Correct answer
- Bfillna()Correct answer
- CUPDATE FROM Kudu
- DDELETE FROM Hive
Why this is the answer
Spark provides dropna() to remove rows with nulls and fillna() to replace nulls with a value.
- Question 6Interactive
Given the Spark SQL code that imputes median values, what is the effect on the feature's variance?
- AVariance increases
- BVariance decreasesCorrect answer
- CVariance remains unchanged
- DVariance becomes zero
Why this is the answer
Imputing with the median concentrates values around the median, reducing overall variance of the column.
- Question 7Single Choice
When missingness of a variable depends on other observed variables, the mechanism is called:
- AMissing Completely at Random (MCAR)
- BMissing at Random (MAR)Correct answer
- CMissing Not at Random (MNAR)
- DMissing by Design (MBD)
Why this is the answer
MAR occurs when missingness is related to observed variables but not the missing value itself.
- Question 8Multiple Select
Which two advantages does Iceberg hidden partitioning offer over traditional Hive-style partitioning?
- ARequires manual partition directory creation
- BSupports automatic schema evolution without rewriteCorrect answer
- CNeeds explicit PARTITIONED BY in DDL
- DAutomatically prunes partitions based on query filtersCorrect answer
Why this is the answer
Iceberg hidden partitioning allows schema evolution and automatic partition pruning without managing directories.
- Question 9Interactive
Examine the Impala DDL. What common issue arises if you add `user_id` as a partition column?
- ASmall files problem
- BPartition explosion (too many partitions)Correct answer
- CData skew
- DPredicate pushdown failure
Why this is the answer
Partitioning on high-cardinality columns like user_id creates millions of directories, causing metadata overload and slow queries.
- Question 10Single Choice
Which file format is best for ML training when only a few columns are needed from a wide table?
- AAvro
- BParquetCorrect answer
- CJSON
- DCSV
Why this is the answer
Parquet is columnar, so it reads only the selected columns, drastically reducing I/O compared to row-based formats.
Machine Learning Operations (MLOps)
8 questions in this domain
- Question 11Single Choice
What does the acronym CI/CD represent in machine learning operations?
- AContinuous Integration and Continuous DeliveryCorrect answer
- BContinuous Integration and Continuous Deployment
- CCode Integration and Code Deployment
- DContinuous Improvement and Development
Why this is the answer
CI/CD stands for Continuous Integration and Continuous Delivery, automating code, data, and model changes from development to production.
- Question 12Multiple Select
Select two components that are part of the MLflow model registry.
- AModel versionsCorrect answer
- BExperiment runs
- CStage transitionsCorrect answer
- DModel training code
Why this is the answer
The MLflow model registry manages model versions and stage transitions. Experiment runs are tracked separately by MLflow Tracking.
- Question 13Interactive
Which method logs a hyperparameter during an MLflow experiment run?
- Amlflow.log_paramCorrect answer
- Bmlflow.log_metric
- Cmlflow.set_tag
- Dmlflow.log_artifact
Why this is the answer
The mlflow.log_param() function is used to log key-value parameters such as learning rate.
- Question 14Single Choice
What type of trigger is used when retraining is started after model accuracy drops below a threshold?
- APerformance-driven triggerCorrect answer
- BTime-based trigger
- CData-driven trigger
- DEvent-driven trigger
Why this is the answer
A performance-driven trigger retrains the model when its metrics fall below a defined threshold, such as accuracy dropping below 85%.
- Question 15Multiple Select
Select two capabilities of Apache Ranger for securing ML workflows.
- AFine-grained access controlCorrect answer
- BData lineage tracking
- CColumn-level maskingCorrect answer
- DModel versioning
Why this is the answer
Apache Ranger provides fine-grained access control and dynamic data masking. Data lineage is provided by Apache Atlas.
- Question 16Interactive
From the given stages, select two that are standard in an ML CI/CD pipeline.
- AData ValidationCorrect answer
- BCode Compilation
- CCanary DeploymentCorrect answer
- DManual Testing
Why this is the answer
Typical ML CI/CD pipelines include Data Validation and Canary Deployment stages to ensure quality and safe rollout.
- Question 17Single Choice
Which attribute of a model version in MLflow cannot be changed after creation?
- AVersion numberCorrect answer
- BStage label
- CTags
- DDescription
Why this is the answer
The version number is auto-incremented and cannot be overridden. Stage, tags, and description can be updated later.
- Question 18Multiple Select
Select two components necessary to reproduce a machine learning experiment.
- AData versionCorrect answer
- BEnvironment configurationCorrect answer
- CModel accuracy
- DNumber of features
Why this is the answer
Reproducibility requires capturing the data version (hash/snapshot) and the full environment (conda.yaml or requirements.txt).
Machine Learning Pipeline Design
13 questions in this domain
- Question 19Single Choice
Which component in Cloudera CDP is primarily used for streaming data ingestion with low latency?
- AApache KafkaCorrect answer
- BApache NiFi
- CApache Spark
- DApache Hive
Why this is the answer
Apache Kafka is the primary streaming engine in CDP, offering a durable, partitioned log for low-latency data ingestion.
- Question 20Multiple Select
Which tools are suitable for scheduled batch data ingestion in CDP? (Choose two.)
- AApache SparkCorrect answer
- BApache HiveCorrect answer
- CApache Kafka
- DApache NiFi
Why this is the answer
Apache Spark and Hive on Tez are used for batch processing; Kafka and NiFi are primarily for streaming.
- Question 21Interactive
Refer to the code block. What is the role of the StringIndexer transformer?
- AConverts string column to numeric indicesCorrect answer
- BScales numeric features to unit variance
- CFills missing values with median
- DCreates interaction terms
Why this is the answer
StringIndexer encodes a string column to a column of indices, commonly used for categorical features.
- Question 22Single Choice
What is the primary goal of feature selection in machine learning pipelines?
- AReduce dimensionality and overfittingCorrect answer
- BIncrease model complexity
- CAdd more raw data
- DSpeed up data ingestion
Why this is the answer
Feature selection reduces dimensionality and mitigates overfitting by keeping only relevant features.
- Question 23Multiple Select
Which techniques are commonly used to handle missing values in feature engineering? (Select all that apply.)
- AImpute with meanCorrect answer
- BDrop rows with missing valuesCorrect answer
- CAdd a missing value indicator columnCorrect answer
- DFill with zeros
Why this is the answer
Common handling includes imputation, dropping rows, and adding indicators; filling with zeros can introduce bias.
- Question 24Interactive
Refer to the code block. What metric is being calculated by the evaluator?
- AAUC-ROCCorrect answer
- BPrecision
- CRecall
- DF1-Score
Why this is the answer
The code uses BinaryClassificationEvaluator with metricName='areaUnderROC', which computes AUC-ROC.
- Question 25Single Choice
In Apache Airflow, what does the acronym DAG stand for?
- ADirected Acyclic GraphCorrect answer
- BData Aggregation Group
- CDynamic Application Grid
- DDistributed Algorithm Gateway
Why this is the answer
DAG stands for Directed Acyclic Graph, the core abstraction for defining task dependencies in Airflow.
- Question 26Multiple Select
Which components are essential for automating ML pipelines in CDP? (Select two.)
- AModel RegistryCorrect answer
- BFeature StoreCorrect answer
- CData Profiling
- DManual Deployment
Why this is the answer
Model Registry and Feature Store are essential for versioning, lineage, and consistency in automated pipelines.
- Question 27Interactive
Refer to the code block. What is the purpose of the randomSplit method?
- ASplit data into training and test setsCorrect answer
- BScale features
- CHandle missing values
- DEncode categorical variables
Why this is the answer
randomSplit is used to randomly split a DataFrame into two or more subsets, often for training and testing.
- Question 28Single Choice
Which Spark MLlib transformer converts a categorical string column to numeric indices?
- AStringIndexerCorrect answer
- BOneHotEncoder
- CVectorAssembler
- DStandardScaler
Why this is the answer
StringIndexer converts string input to integer indices, commonly the first step for categorical features.
- Question 29Multiple Select
Which statements about batch ingestion are true? (Select two.)
- ABatch ingestion has higher latencyCorrect answer
- BBatch ingestion is cost-efficient for historical analysisCorrect answer
- CBatch ingestion uses Kafka topics
- DBatch ingestion is suitable for real-time scoring
Why this is the answer
Batch ingestion has latency of minutes to hours and is cost-efficient for historical data; Kafka topics are for streaming.
- Question 30Interactive
Refer to the code block. What is the execution order of tasks in this Airflow DAG?
- Atask1, then task2, then task3Correct answer
- Btask3, then task2, then task1
- CAll tasks run in parallel
- DRandom order
Why this is the answer
The bitshift operator >> sets dependencies, so task1 completes before task2, which completes before task3.
- Question 31Single Choice
What is the main benefit of using a feature store in ML pipelines?
- AEnsures consistent features across training and servingCorrect answer
- BReduces data storage costs
- CEliminates need for feature engineering
- DSpeeds up data ingestion
Why this is the answer
A feature store provides a single source of truth, ensuring the same features are used for both training and inference.
Model Deployment and Serving
10 questions in this domain
- Question 32Single Choice
What is the primary purpose of model serialization in the ML lifecycle?
- ATo compress model artifacts for storage efficiency
- BTo capture the complete state of a trained model into a portable formatCorrect answer
- CTo increase the speed of model training iterations
- DTo automatically deploy the model to a Kubernetes cluster
Why this is the answer
Model serialization saves the entire model state (architecture, parameters, metadata) into a durable format, enabling reproducibility and deployment.
- Question 33Multiple Select
Which of the following are features of CDSW model deployments? (Select two)
- AAutomatic containerization of model code and dependenciesCorrect answer
- BRequires manual creation of Docker images
- CSupports canary releases with traffic splittingCorrect answer
- DDeployments are stateful and preserve session data
Why this is the answer
CDSW automatically packages the model into a container and supports canary releases for gradual rollouts. It is stateless and does not require manual Docker builds.
- Question 34Interactive
Review the code snippet below. What is the purpose of the `predict()` function defined inside `Model` class?
- AIt loads the model from disk each time a request is received
- BIt is the inference function that will be exposed as the REST API endpointCorrect answer
- CIt trains the model with incoming data
- DIt serializes the model into ONNX format
Why this is the answer
The `predict` function is the core inference method. CDSW deployments call this function to return a prediction for an input payload.
- Question 35Single Choice
What type of drift occurs when the distribution of input features changes over time?
- AConcept drift
- BData driftCorrect answer
- CModel drift
- DUpstream drift
Why this is the answer
Data drift (or covariate shift) is the change in the distribution of input features, while concept drift refers to a change in the relationship between inputs and outputs.
- Question 36Multiple Select
Which of the following are components of scaling inference in CDP? (Select two)
- AHorizontal Pod Autoscaling (HPA) based on CPU or custom metricsCorrect answer
- BStatic model parallelism across multiple GPUs
- CServerless endpoints that can scale to zero when idleCorrect answer
- DTraining data pipeline optimization
Why this is the answer
HPA and serverless (Knative) are CDP-native scaling methods. Model parallelism is for training, not serving. Data pipelines are separate from inference scaling.
- Question 37Interactive
Examine the MLflow logging code. What flavor is used for the logged model?
- Apython_functionCorrect answer
- Bsklearn
- Ctensorflow
- Dpytorch
Why this is the answer
`mlflow.pyfunc.log_model` logs a `python_function` flavor, which wraps any Python model with a standard predict interface.
- Question 38Single Choice
What is the first step when deploying a model from CDSW to a Kubernetes production cluster?
- AExport the model artifact and create a Docker imageCorrect answer
- BApply the Kubernetes deployment YAML directly from CDSW
- CSchedule a CML job to run the model as a batch job
- DCreate a new CDSW project and retrain the model
Why this is the answer
The model must first be exported and containerized before it can be deployed to Kubernetes. CDSW does not directly push to Kubernetes.
- Question 39Multiple Select
Which of the following are characteristics of batch inference endpoints? (Select two)
- AProcesses large volumes of data asynchronouslyCorrect answer
- BReturns predictions in sub-second latency
- CTypically scheduled via cron or event triggersCorrect answer
- DRequires a continuously running server
Why this is the answer
Batch inference runs as a job, not a server, processes data in bulk, and is scheduled or event-triggered. It is asynchronous and not suitable for real-time latency.
- Question 40Interactive
The code snippet computes which drift detection metric?
- APopulation Stability Index (PSI)Correct answer
- BKolmogorov-Smirnov test
- CChi-squared test
- DKullback-Leibler divergence
Why this is the answer
PSI is computed by binning expected and actual distributions and summing the (actual-expected) * ln(actual/expected) terms.
- Question 41Single Choice
When would you choose CPU-based inference instead of GPU for a deployed model?
- AWhen the model is a small gradient-boosted tree with low latency requirementsCorrect answer
- BWhen the model requires high throughput for large deep learning networks
- CWhen the inference load is primarily batch jobs with massive data
- DWhen the model must process multi-modal inputs like images and text
Why this is the answer
CPU is cost-effective for small, low-latency models (e.g., tree-based). GPU benefits deep learning models or high-volume workloads.
Frequently asked questions
Everything about the CDP Machine Learning Engineer question bank and how to use it.