1. A Spark ML pipeline must chain a StringIndexer, a VectorAssembler, and a classifier so the same transformations apply consistently at train and inference time. Which construct enforces this?
- A. A Spark ML Pipeline (stages of Transformers and an Estimator)✓ Correct
- B. A plain Python list of functions
- C. A Databricks Job
- D. A Delta table
Explanation
A Spark ML Pipeline bundles Transformers and an Estimator into stages, so fitting produces a PipelineModel that applies the identical sequence at inference — preventing training/serving skew. A list of functions (B) isn't a managed pipeline, a Job (C) orchestrates tasks, and a Delta table (D) stores data.