Home / artificial-intelligence-machine-learning / Databricks Certified Machine Learning Associate / Cheat Sheet
Databricks Certified Machine Learning Associate

Databricks ML Cheat Sheet

Databricks ML Assoc Tests MLflow, Feature Engineering and Spark ML Mechanics — Not Deep Theory

For practitioners training and deploying classic ML on Databricks. Over a third is platform workflow, so know exact client calls (fe.log_model, aliases, search_runs) as well as when median beats mean.

Check Your Readiness →
Among the harder certs
Avg: Not published by Databricks
Pass: 750 / 1000
Most candidates understand Databricks Certified Machine Learning Associate concepts — and still fail. This exam tests how you apply knowledge under pressure.

Machine Learning Associate Domain Map

The guide file is labelled August 2026 but its content is dated 1 March 2025, with 48 objectives across four sections. Questions blend short workspace scenarios, PySpark or MLflow code fragments, and small calculations such as counting models trained by a grid search with cross-validation.

  1. 01
    Databricks Machine Learning (38%) — Runtime ML, AutoML glass-box notebooks, Unity Catalog feature tables, MLflow tracking, model aliases
  2. 02
    Model Development (31%) — algorithm choice, class imbalance, estimators vs transformers, Hyperopt fmin, CrossValidator, metrics
  3. 03
    Data Processing (19%) — summary statistics, IQR outliers, imputation choice, encoding, correlation vs chi-square
  4. 04
    Model Deployment (12%) — batch vs streaming vs real-time, spark_udf, custom pyfunc, endpoint traffic splitting

Wrong instinct vs correct approach

A churn model shows 99% accuracy on data where only 1% of customers churn
✕ Wrong instinct

Promote it because accuracy is excellent

✓ Correct approach

Predicting no churn for everyone also scores 99%. Judge imbalanced classifiers by recall, precision, F1 or PR AUC, and mitigate imbalance with class weights through weightCol rather than resampling before the split.

A job loads models:/main.ml.churn@champion and a newer version must go live without code changes
✕ Wrong instinct

Transition the new version to the Production stage

✓ Correct approach

Unity Catalog models have no stages, and tags do not route loads. Reassign the champion alias to the new version; every loader using @champion picks it up, and rollback is reassigning the alias back.

A 100-million-row table must be scored nightly and results are read the next morning
✕ Wrong instinct

Deploy a real-time Model Serving endpoint and call it per row

✓ Correct approach

Nobody needs an immediate answer, so batch scoring is cheapest. Wrap the model with mlflow.pyfunc.spark_udf in a scheduled job so executors score partitions in parallel; avoid toPandas, which collects everything onto the driver.

Training error is low but validation error is high after switching to deeper trees
✕ Wrong instinct

Increase tree depth further to capture more signal

✓ Correct approach

A large train-validation gap signals high variance, meaning overfitting. Reduce complexity, regularise, or add data. High bias looks different: training and validation errors are both high, and only then does added complexity help.

Know these cold

  • ▸ Sort search_runs ascending for RMSE, MAE and log loss; descending for accuracy, F1 and AUC
  • ▸ Estimators learn with fit() and return models; transformers only transform; a fitted model is a transformer
  • ▸ StringIndexer must run before OneHotEncoder; skip one-hot on high-cardinality IDs for tree models
  • ▸ IQR rule keeps values within 1.5 IQR of Q1 and Q3; get quartiles with approxQuantile
  • ▸ summary() adds 25%, 50% and 75% percentiles; describe() does not
  • ▸ Pearson or Spearman for two continuous features; chi-square on a contingency table for two categorical
  • ▸ Exponentiate log-scale predictions with exp or expm1 before computing RMSE or MAE
  • ▸ Unity Catalog feature tables need a non-nullable primary key and are shared across workspaces
  • ▸ Online store serves millisecond lookups; offline Delta feature tables serve training and batch scoring
  • ▸ One serving endpoint can split traffic between served models; percentages must sum to 100

Can you answer these without checking your notes?

In this scenario: "A churn model shows 99% accuracy on data where only 1% of customers churn" — what should you do first?
Predicting no churn for everyone also scores 99%. Judge imbalanced classifiers by recall, precision, F1 or PR AUC, and mitigate imbalance with class weights through weightCol rather than resampling before the split.
In this scenario: "A job loads models:/main.ml.churn@champion and a newer version must go live without code changes" — what should you do first?
Unity Catalog models have no stages, and tags do not route loads. Reassign the champion alias to the new version; every loader using @champion picks it up, and rollback is reassigning the alias back.
In this scenario: "A 100-million-row table must be scored nightly and results are read the next morning" — what should you do first?
Nobody needs an immediate answer, so batch scoring is cheapest. Wrap the model with mlflow.pyfunc.spark_udf in a scheduled job so executors score partitions in parallel; avoid toPandas, which collects everything onto the driver.

Common Exam Mistakes — What candidates get wrong

Forgetting the final refit when counting models trained by CrossValidator

Models trained equals grid combinations multiplied by folds, plus one refit of the best parameters on the full training data. A 12-combination grid with 5 folds trains 61 models, not 60, and parameter value counts are multiplied, never added.

Logging a feature-store model with a plain flavor log_model call

Only FeatureEngineeringClient.log_model with the training_set stores feature lookup metadata. Then score_batch and serving fetch features from the Unity Catalog feature table using just primary keys; mlflow.sklearn.log_model forces callers to supply every feature.

Returning accuracy directly from a Hyperopt objective function

fmin minimises, so returning accuracy searches for the worst settings; return negative accuracy or a loss. Hyperopt is deprecated after Databricks Runtime 16.4 LTS ML in favour of Optuna or Ray Tune, yet the guide still tests fmin, TPE and SparkTrials.

Imputing a skewed numeric column with the mean

A few extreme values pull the mean upward, so fills overstate typical values; the median resists skew, and the mode handles categorical columns. Fit Imputer on training data only, because fitting before the split leaks test statistics into the fill values.

Using SparkTrials to tune a distributed Spark ML estimator

SparkTrials distributes single-node trials, such as scikit-learn fits, across workers. An estimator from pyspark.ml already distributes each fit, so pair it with the default Trials class. Also remember TPE (tpe.suggest) is Bayesian, not random search.

Resources to help you pass Databricks Machine Learning Associate on your first attempt

See whether your MLflow calls, tuning arithmetic and serving choices hold up under exam conditions.