Study guidePro
Databricks Machine Learning Associate
Every domain of the Databricks Machine Learning Associate exam explained, with decision tables, runnable Python, diagrams and the traps the questions set, following the March 2025 exam guide.
Aligned to the March 2025 exam guide · checked against the Databricks docs on 31 October 2026 · certlake.com/exam/machine-learning-associate/study-guide
Exam at a glance
| Questions | 48 scored, multiple choice and multiple select |
| Time | 90 minutes |
| Pass mark | Not published by Databricks; practise to 70% or better |
| Language | Python |
| Exam guide | March 2025 |
| Domain | Weight | ≈ Questions |
|---|---|---|
| Databricks Machine Learning | 38% | 18 |
| Model Development | 31% | 15 |
| Data Processing | 19% | 9 |
| Model Deployment | 12% | 6 |
1. Databricks Machine Learning38% of the exam
The lifecycle end to end
MLOps: promote code or promote models
| Promote | How | Choose it when |
|---|---|---|
| Code (the recommended default) | Training code moves dev → staging → prod; the model is retrained in each environment | Prod data lives only in prod, retraining is cheap, and you want the prod model built by reviewed code |
| Models | Train once; promote the artifact (copy_ or an alias) | Training is very expensive or hard to reproduce, all work is in one workspace, or there's no CI/CD. Not viable if dev can't reach prod data |
Keep code in Git, data and models in Unity Catalog, one catalog per environment (dev, staging, prod), and run production jobs as a service principal, not a person.
Databricks Runtime ML
The standard runtime plus the ML stack, preinstalled and version-tested: scikit-learn, XGBoost, LightGBM, PyTorch, TensorFlow, MLflow and the Feature Engineering client. GPU variants add CUDA.
- No dependency resolving of your own; distributed training and autologging ready to use. AutoML is included up to Runtime 17.x ML and was removed in 18.0 ML.
%pip installextras in a notebook, scoped to that session.- AutoML runs on Runtime ML with dedicated access mode for Unity Catalog data; standard access mode isn't supported.
AutoML
AutoML trains many models on a table, logs every trial to MLflow and hands you code, not a black box: automl. (or regress, forecast).
- Problems: classification, regression and forecasting.
- Output: a data exploration notebook (distributions, missing values, correlations) and an editable notebook per trial, with the preprocessing it did (imputation, type detection) written out.
- Default split: random 60% train / 20% validation / 20% test; a
time_splits chronologically.col
Feature tables in Unity Catalog
A feature table is a Unity Catalog Delta table with a primary key.
import mlflow
from databricks.feature_engineering import (
FeatureEngineeringClient, FeatureLookup,
)
fe = FeatureEngineeringClient()
name, key = "main.ml.customer_features", "customer_id"
fe.create_table(name=name, primary_keys=[key],
schema=features_df.schema)
# "merge", the only mode, upserts on the key
fe.write_table(name=name, df=features_df,
mode="merge")
# labels_df: customer_id, churned
training_set = fe.create_training_set(
df=labels_df,
feature_lookups=[FeatureLookup(
table_name=name, lookup_key=key,
feature_names=["tenure_months", "avg_spend"])],
label="churned", exclude_columns=[key],
)
model = train(training_set.load_df()) # as usual
# the lookups are stored with the model
fe.log_model(model=model, artifact_path="model",
flavor=mlflow.sklearn,
training_set=training_set,
registered_model_name="main.ml.churn")
# pass keys only: the features are looked up again
preds = fe.score_batch(
model_uri="models:/main.ml.churn@champion",
df=ids_df)
- Because
log_stores the lookups,model score_reads the same features at inference time: that's how training/serving skew is avoided.batch write_has no overwrite mode: to replace the data,table DELETE FROMthe table or drop and recreate it.- Limits: at most 50 feature tables to train one model, and 100 on-demand features.
Unity Catalog vs workspace feature tables
| Unity Catalog | Legacy workspace store | |
|---|---|---|
| Scope | Every workspace on the metastore | One workspace |
| Governance | UC privileges, lineage, tags, audit | Workspace permissions |
| The table | A UC Delta table with a primary key, usable from SQL and BI | A Delta table in the Hive metastore; deprecated, only in workspaces created before 19 Aug 2024 |
Offline vs online feature tables
| Offline | Online | |
|---|---|---|
| Storage | Delta table in UC | Databricks Online Feature Store (Lakebase) |
| Reads | Batches, for training and batch scoring | One row by key, in milliseconds |
| Used by | create_, score_ | A serving endpoint, per request |
Publish to an online store when an endpoint must look up features that aren't sent in the request.
MLflow tracking
An experiment holds runs; a run holds parameters, metrics (optionally per step), tags, artifacts and models.
import mlflow
mlflow.set_experiment("/Users/me/churn")
with mlflow.start_run(run_name="gbt-depth5") as run:
mlflow.log_param("max_depth", 5)
mlflow.log_metric("val_f1", 0.81)
mlflow.log_figure(fig, "roc.png")
mlflow.sklearn.log_model(model, name="model")
Autologging is on for notebook training runs on Runtime ML, capturing parameters, metrics and the model with no logging code. Elsewhere (serverless included) call mlflow.; mlflow. stops it.
The MLflow UI shows, per run: parameters, metrics, tags, artifacts, the logged model and its signature (its own object in MLflow 3), the source notebook and revision, the dataset, and a sortable table to compare runs.
Find the best run with the client API
best = mlflow.search_runs(
experiment_names=["/Users/me/churn"],
order_by=["metrics.val_f1 DESC"],
max_results=1,
)
run_id = best.loc[0, "run_id"]
mlflow. returns a pandas DataFrame; Mlflow returns Run objects. Both take a filter_, such as "metrics..
Register a model in Unity Catalog
mlflow.set_registry_uri("databricks-uc")
# name is catalog.schema.model
mlflow.register_model(
model_uri=f"runs:/{run_id}/model",
name="main.ml.churn",
)
Or register as you log, with registered_. Each registration adds the next version. A model in Unity Catalog needs a signature; autologging and log_ add one.
Privileges: USE CATALOG + USE SCHEMA + CREATE MODEL to create a model; ownership or CREATE MODEL VERSION to add versions; EXECUTE on the model to load or serve it.
Aliases and tags
from mlflow import MlflowClient
c, m = MlflowClient(), "main.ml.churn"
c.set_registered_model_alias(m, "champion", 3)
c.set_registered_model_alias(m, "challenger", 4)
# promote: repoint the alias, don't retrain
c.set_registered_model_alias(m, "champion", 4)
c.delete_registered_model_alias(m, "challenger")
c.set_registered_model_tag(m, "team", "growth")
c.delete_registered_model_tag(m, "team")
c.set_model_version_tag(m, "4", "validated", "true")
Load models:/ (alias) or models:/ (version). Batch jobs that load the alias pick up the new version on their next run; an endpoint serves a fixed version, so update it to the version the alias now points to.
Unity Catalog vs workspace model registry
| Models in Unity Catalog | Workspace registry (legacy) | |
|---|---|---|
| Name | catalog., across workspaces | Flat, per workspace |
| Access | UC privileges, inherited | Workspace permissions |
| Promotion | Aliases (@champion) and tags | Stages (Staging, Production, Archived) |
| Extras | Lineage, audit log, cross-workspace discovery, sharing | Run lineage, webhooks, email notifications |
The rest of this guide is part of Pro
3 more domains, explained with snippets, decision tables and diagrams:
- 2. Data Processing · 19%
- 3. Model Development · 31%
- 4. Model Deployment · 12%
Know it, or just recognise it?
The free diagnostic shows which domains you'd lose marks on, in about 10 minutes and without signing up.
Take the free diagnosticCheat sheet
The two-page cheat sheet: rules, defaults and traps for the last week before the exam.
Open the cheat sheetSpotted something out of date? Email support@certlake.com. CertLake is not affiliated with Databricks, Inc.