Home / Practice tests / ML Associate

Free · No credit card required

Databricks Machine Learning Associate Practice Test

Realistic practice questions with worked explanations — Databricks ML, AutoML, MLflow tracking, Feature Store, model development and deployment.

45 questions on the real exam
90 min time limit
$200 per exam attempt

Exam blueprint

What's on the exam

The exam sections with their official weights — focus your study time where the points are.

Databricks Machine Learning

38%

ML runtime, AutoML, Feature Store, MLflow tracking and the model registry, experiment management.

Model Development

31%

scikit-learn and Spark ML pipelines, hyperparameter tuning with Hyperopt, evaluation metrics.

Data Processing

19%

Feature engineering with Spark and the pandas API, missing data, splits at scale.

Model Deployment

12%

Model Serving endpoints, batch vs. real-time inference, model versioning and stages.

Straight from our question bank

Try 4 real practice questions

Every question comes with a worked explanation — expand the answer when you're ready.

1 Databricks Machine Learning

A machine learning engineer already has a Unity Catalog Delta table with the correct columns, but it was created without a primary key. She wants to use it as a feature table rather than recreating it. What should she do?

  1. AClone the table into the workspace Feature Store, because only tables created there can later be upgraded into feature tables recognized by the Feature Engineering UI and API
  2. BAlter the existing Unity Catalog Delta table to make the key columns NOT NULL and add a primary key constraint, after which the table can be used as a feature table
  3. CConvert the Delta table into a notebook-scoped temporary table and then call create_training_set, because feature table recognition happens dynamically only at model training time and not in catalog metadata
  4. DRegister the table as a model artifact in MLflow first, because feature table discovery in Catalog Explorer depends on the table being linked to at least one active experiment run
  5. EPublish the table to an online store immediately, because the publish_table operation backfills the missing primary key metadata and makes the source table eligible for offline feature engineering workflows
Show answer & explanation

Correct answer: B

WHY B: Databricks docs describe converting an existing UC Delta table into a feature table by setting primary key columns to NOT NULL and adding a primary key constraint. WHY NOT A: Workspace Feature Store is not required. WHY NOT C: Temporary tables are not the path to governed feature tables. WHY NOT D: MLflow registration is unrelated. WHY NOT E: Online publishing does not create missing primary key metadata on the source table.

2 Model Development

A scikit-learn GridSearchCV job is running on one large machine with many CPU cores. The model itself is single node, but the engineer wants different parameter-fold evaluations to run concurrently on that machine. Which configuration is the standard approach?

  1. ASet n_jobs on GridSearchCV so candidate evaluations can run in parallel across the available local workers
  2. BSet random_state on the estimator so all folds execute at the same time with identical pseudorandom seeds
  3. CUse train_test_split instead of cross-validation so the model automatically parallelizes over the remaining samples
  4. DExport the training set to CSV so each core can read a different file shard during a separate notebook run
  5. EConvert the model to SQL because parameter search objects only parallelize queries, not Python model evaluations
Show answer & explanation

Correct answer: A

WHY A: GridSearchCV supports parallel execution through n_jobs, which runs parameter-fold fits concurrently on a single machine. WHY NOT B: random_state controls reproducibility, not parallelism. WHY NOT C: A single split does not create the same tuning parallelism. WHY NOT D: CSV sharding is not the standard mechanism. WHY NOT E: SQL conversion is unrelated.

3 Data Processing

A data engineer is building a Spark MLlib Pipeline to prepare a categorical string column city for a logistic regression model. The city column contains string values like 'Seattle', 'Austin', 'Chicago'. Which sequence of preprocessing steps correctly implements one-hot encoding for this column so that it is suitable for a linear model?

  1. AApply OneHotEncoder directly to the string city column with handleInvalid='keep', producing a sparse binary vector for each city value — PySpark's OneHotEncoder accepts string-type columns directly and handles the string-to-index conversion internally before constructing the binary vectors
  2. BApply OneHotEncoder to the city column and then normalize the resulting binary vector using StandardScaler before passing it to logistic regression — the normalization step is required to rescale the binary indicator values so that the logistic regression model can learn stable coefficients from encoded categorical inputs
  3. CApply StringIndexer to convert city strings to numeric indices and then pass those indices directly to the logistic regression model — Spark MLlib's LogisticRegression transformer automatically applies one-hot encoding internally to any IntegerType or DoubleType input features that were produced by StringIndexer, so an explicit OneHotEncoder step is unnecessary
  4. DApply StringIndexer to convert city strings to numeric indices, then apply OneHotEncoder to convert those indices to sparse binary vectors, then use VectorAssembler to combine the encoded city vector with any other numeric features into a single features vector — this three-step sequence (StringIndexer → OneHotEncoder → VectorAssembler) is the standard PySpark MLlib pattern for preparing categorical features for linear models
  5. EApply HashingTF to hash each city string value into a fixed-length sparse frequency vector — HashingTF is PySpark MLlib's recommended preprocessing step for nominal categorical string columns in classification pipelines because it avoids the two-step StringIndexer + OneHotEncoder overhead and directly produces numeric vectors compatible with logistic regression
Show answer & explanation

Correct answer: D

WHY D: This is the correct PySpark MLlib pipeline for one-hot encoding string categorical features. StringIndexer converts string categories to integer indices (required before OHE), OneHotEncoder converts those indices to sparse binary vectors (one indicator per category, dropLast=True by default to avoid multicollinearity), and VectorAssembler combines all features into the single 'features' vector expected by MLlib models. WHY NOT A: PySpark's OneHotEncoder does not accept string columns — it requires integer-indexed input produced by StringIndexer first; attempting to pass strings directly will raise a type error. WHY NOT B: OneHotEncoder cannot accept string inputs directly; additionally, StandardScaler is inappropriate for binary indicator features already on the [0,1] scale and is not a substitute for StringIndexer. WHY NOT C: Spark MLlib's LogisticRegression does not auto-apply one-hot encoding to StringIndexer output; the model treats integer indices as ordinal numeric values, introducing a false ordering relationship between city categories. WHY NOT E: HashingTF is designed for text feature extraction — it hashes individual words from a document into a frequency vector; it is not the recommended approach for encoding a single nominal categorical column like city, and it can introduce hash collisions.

4 Model Deployment

A team has written custom Python inference logic that is not covered by a built-in MLflow flavor. They want to deploy it with Databricks Model Serving. Which preparation path is correct?

  1. AZip the notebook source and upload it directly to a serving endpoint without using MLflow model packaging
  2. BSave only the fitted weights to DBFS, because endpoints infer the rest of the Python environment automatically
  3. CLog the model in MLflow format, typically with pyfunc for custom code, register it, and then create a serving endpoint
  4. DRegister a Delta table as a model version, because serving endpoints can execute SQL tables as Python models
  5. EExport the model to CSV and point the endpoint at the file path so Databricks can discover the predict function
Show answer & explanation

Correct answer: C

WHY C: Databricks custom model serving expects an MLflow-packaged model, often via pyfunc for arbitrary Python logic, followed by registration and endpoint creation. WHY NOT A: A raw notebook is not the required serving artifact. WHY NOT B: Dependencies and model packaging must be captured properly. WHY NOT D: Delta tables are not model artifacts. WHY NOT E: CSV files do not define deployable MLflow model logic.

Take the full practice test free →

Why it works

Practice tests beat re-reading the docs

Find your weak spots in 20 minutes instead of 20 hours.

Take a timed test

Full-length, under exam conditions — no signup needed to try.

See your breakdown

Score plus a topic-by-topic analysis of where you lost points.

Study what matters

Focus on your two or three weakest areas — every explanation teaches the concept.

Retake until ready

Consistently above 80%? You're ready to book the real exam.

FAQ

Frequently asked questions


Is this Databricks Machine Learning Associate practice test free?

Yes. You can take a full-length Databricks Machine Learning Associate practice test on TestLogicHub without paying or entering a credit card.

How many questions are on the real Databricks Machine Learning Associate exam?

The exam has 45 multiple-choice questions and a 90-minute time limit. It costs USD 200 per attempt and is proctored.

What score do I need to pass?

Databricks does not publish an exact cut score. A safe target is to score consistently above 80% on full-length practice tests before booking the real exam.

Are these questions like the real exam?

The questions are mapped to the official exam guide sections, written in the scenario style of the real exam, and every answer comes with a full explanation.

Does TestLogicHub cover other Databricks certifications?

Yes — TestLogicHub has practice tests for the Databricks Data Engineer Associate and Professional, Data Analyst, Machine Learning Associate, and Generative AI Engineer certifications.

Ready to find your weak spots?

Take the free Databricks Machine Learning Associate practice test — timed, weighted, and explained like the real thing.

Start now — it's free →