Free Databricks Machine Learning Professional practice test

20 questions for the Databricks Machine Learning Professional exam, taken from our 58-question bank and spread across its 3domains by their weighting. No sign-up needed: pick an answer to check it, or open “Show answer & explanation” under any question.

What this test covers

Question 1 · Model Development

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?

Show answer & explanation

Correct answer: B

  • B. A Spark ML Pipeline (stages of Transformers and an Estimator)

A Spark ML Pipeline bundles Transformers and an Estimator into stages. Fitting it produces a PipelineModel that applies the same sequence at inference, which prevents training/serving skew. A list of UDFs is not a managed, fitted pipeline, so the learned state (such as StringIndexer mappings) is not saved together. A Databricks Job orchestrates tasks and does not produce one reusable fitted model. A Delta table stores data and does not apply transformations at inference.

Question 2 · Model Development

Which statement about the Databricks Feature Store and training/serving skew is TRUE?

Show answer & explanation

Correct answer: A

  • A. Using the same feature tables for both training and inference reduces training/serving skew because the feature computation is defined once

Keeping feature definitions in shared feature tables means training and inference use the same computed features, which reduces training/serving skew. It does not add separate serving-time logic that would increase skew. It works for both batch and streaming feature tables. It supplies features to a model; it does not replace the model.

Question 3 · Model Development

Which MLflow component records a training run's parameters, metrics, tags, and artifacts for later comparison?

Show answer & explanation

Correct answer: D

  • D. MLflow Tracking (experiments and runs)

MLflow Tracking organizes runs within experiments and records parameters, metrics, tags, and artifacts so runs can be compared. The Model Registry manages model versions and stages after training. Asset Bundles package projects for CI/CD. Lakehouse Monitoring watches production data with profile and drift tables. None of these three record per-run training details.

Question 4 · Model Development

Which approach BEST supports building an automated, repeatable feature pipeline that keeps feature tables fresh?

Show answer & explanation

Correct answer: D

  • D. Scheduled jobs (or Delta Live Tables) that recompute and upsert feature tables on a cadence

Scheduled Jobs or Delta Live Tables recompute and upsert feature tables automatically, so features stay fresh and consistent. Recomputing by hand is ad hoc and easy to forget. Features cached in notebook memory disappear when the session ends and aren't shared. Exporting CSVs to a shared folder is error-prone, doesn't scale, and leads to stale copies.

Question 5 · Model Development

A team wants to reuse curated features across training and real-time inference with consistent definitions and point-in-time correctness. Which Databricks capability should they use?

Show answer & explanation

Correct answer: C

  • C. Databricks Feature Store / Feature Engineering (feature tables with lookups)

The Databricks Feature Store (Feature Engineering in Unity Catalog) stores feature tables that are looked up the same way for training and inference, and it supports point-in-time joins to avoid leakage. Recomputing pandas features in each notebook leads to drift and skew between definitions. The Model Registry manages models, not reusable feature tables. Init scripts configure clusters and do not provide governed, consistent feature lookups.

Question 6 · Model Development

A model must accept a well-defined input schema and reject malformed requests at serving time. Which MLflow feature helps enforce this?

Show answer & explanation

Correct answer: D

  • D. Logging the model with a signature (and input example) so schema enforcement can validate inputs

An MLflow model signature, with an input example, defines the expected schema and lets inputs be validated at serving time. Changing log levels only affects logging, not request validation. A description in the registry is documentation that nothing enforces. Autoscaling adds capacity but doesn't check or reject bad inputs.

Question 7 · Model Development

To tune hyperparameters across a large search space in parallel on a Databricks cluster, which combination is idiomatic?

Show answer & explanation

Correct answer: B

  • B. Hyperopt with SparkTrials to distribute trials across the cluster

Hyperopt with SparkTrials spreads hyperparameter-tuning trials across the cluster's workers, which parallelizes the search, and it integrates with MLflow tracking. A sequential for-loop on the driver runs one trial at a time, so nothing is parallelized. Lakehouse Monitoring profiles data and model quality and is not a tuning tool. Registering a Model Registry version per combination only manages versions and does not search or parallelize anything.

Question 8 · Model Development

What does an MLflow model SIGNATURE define, and why is it useful?

Show answer & explanation

Correct answer: A

  • A. The expected input and output schema of the model, enabling validation and correct serving

A model signature records the input and output schema. This lets MLflow validate inputs and helps serving infrastructure interpret requests and responses correctly. It does not record cluster size or runtime version; environment details are captured separately. Stages and aliases belong to the Model Registry, not the signature. Search spaces and trial counts are part of tuning configuration, not the signature.

Question 9 · Model Development

What is the difference between a Spark ML Transformer and an Estimator?

Show answer & explanation

Correct answer: D

  • D. A Transformer implements transform() to produce a new DataFrame; an Estimator implements fit() to learn from data and return a Transformer (model)

A Transformer transforms a DataFrame (for example, feature assembly, or a fitted model producing predictions). An Estimator learns from data through fit() and returns a Transformer (the trained model). The claim that a Transformer trains models while an Estimator only scales data swaps the two roles. The claim that they are interchangeable is false because they are distinct abstractions with different methods. The claim that Estimators cannot be Pipeline stages is false, since Estimators are common Pipeline stages.

Question 10 · ML Ops

What is a benefit of defining ML jobs and infrastructure as code (e.g., via Asset Bundles) rather than clicking through the UI?

Show answer & explanation

Correct answer: B

  • B. Deployments become versioned, repeatable, and reviewable across environments, reducing drift and manual error

Defining infrastructure and jobs as code gives you versioned, repeatable, reviewable deployments across environments. That reduces configuration drift and manual mistakes. It doesn't auto-tune hyperparameters or make the model more accurate. Bundle validation only checks configuration, so it doesn't replace unit or integration testing. Bundles also don't store model artifacts in place of the registry; the Unity Catalog registry is still needed.

Question 11 · ML Ops

In the newer Unity Catalog Model Registry, how are model versions typically designated for a role like 'the production model' in a way that decouples the pointer from a specific version number?

Show answer & explanation

Correct answer: C

  • C. Using model aliases (e.g., @champion) that point to a chosen version

Aliases (like @champion or @production) are named pointers to a specific model version, so deployment code references the alias and you can repoint it without changing consumers. Renaming the model each release forces every consumer to change, pinning a fixed version number couples consumers to that version, and deleting older versions is destructive and loses rollback ability.

Question 12 · ML Ops

Which environment-management practice supports promoting ML code safely from development to production?

Show answer & explanation

Correct answer: C

  • C. Separate dev/staging/prod environments (workspaces/catalogs) with deployment via Asset Bundles/CI, not editing prod directly

Distinct dev/staging/prod environments with automated, version-controlled promotion (Asset Bundles + CI) reduce risk and enable testing before production. Developing directly in production, using one shared workspace separated only by folder names, and dropping version control in favor of manual export/import all increase risk and skip proper testing before release.

Question 13 · ML Ops

A registered model in Unity Catalog needs governed, permissioned access so only authorized users/services can use or promote it. Which platform capability provides this?

Show answer & explanation

Correct answer: D

  • D. Unity Catalog governance (permissions/grants on the registered model)

Unity Catalog applies fine-grained permissions and grants to registered models, controlling who can read, use, or manage them. Pre-signed storage URLs skip governance entirely, because anyone with the link can get to the artifacts. Folder ACLs on the training notebook protect the notebook, not the registered model. Cluster access mode settings control how a cluster isolates users. They don't grant permissions on a specific model.

Question 14 · ML Ops

A monitoring job detects significant drift in a production model's inputs. Which automated response is appropriate in an MLOps pipeline?

Show answer & explanation

Correct answer: D

  • D. Trigger a retraining workflow on recent data and, after validation, promote the new model

Detected drift should trigger retraining on fresh data, validation, and promotion of the improved model, which closes the MLOps loop. Suppressing the alert lets accuracy decay. Deleting the model and endpoint with no replacement causes an outage. Changing serving timeout or concurrency affects capacity, not drift.

Question 15 · ML Ops

A team wants a model to be automatically retrained on fresh data on a schedule and, if it passes validation, promoted for deployment. Which Databricks features orchestrate this?

Show answer & explanation

Correct answer: A

  • A. Databricks Jobs (workflows) running the retraining + validation, with Model Registry transitions/aliases on success

Databricks Jobs orchestrate scheduled multi-task retraining and validation, and on success the model is registered and its alias/stage updated for deployment — an automated retraining pipeline. A manually run notebook doesn't automate anything, a static model never adapts to fresh data, and Lakehouse Monitoring alone detects drift but doesn't retrain or promote models.

Question 16 · ML Ops

Which combination BEST describes a mature automated retraining loop on Databricks?

Show answer & explanation

Correct answer: C

  • C. Monitor drift/quality → trigger a scheduled/event-driven Job to retrain and validate → register the new version → update the production alias on success

A mature loop monitors drift and quality, uses Jobs to trigger retraining and validation, registers the candidate, and promotes it by updating the alias on success. This closes the feedback loop. Retraining by hand after customer complaints is reactive and bypasses governance. Serving one model forever ignores drift. Retraining every few seconds with no validation gates is wasteful and risky. All three are poor operational practices.

Question 17 · ML Ops

A production ML system should keep a record of which model version served which predictions. Why is this important for MLOps?

Show answer & explanation

Correct answer: D

  • D. It enables auditing, debugging incidents, and correctly attributing performance to a specific model version

Recording which model version produced which predictions supports audits and incident debugging. It also lets you credit observed quality to the right version. It doesn't cache predictions to speed up training, prune features to reduce feature count, or make the endpoint re-tune hyperparameters automatically.

Question 18 · ML Ops

A team wants an automated action (e.g., run tests or notify a channel) to trigger when a model version transitions stage in the registry. Which mechanism supports this?

Show answer & explanation

Correct answer: B

  • B. MLflow Model Registry webhooks (or job triggers on registry events)

Registry webhooks (or event-triggered jobs) fire on model lifecycle events like a stage transition, enabling automated testing, notifications, or deployment. Init scripts run only at cluster startup, Delta CHECK constraints validate data rather than trigger actions, and dashboard refreshes don't react to registry events.

Question 19 · Model Deployment

A canary deployment of a new model version shows elevated error rates shortly after receiving 5% of traffic. What is the appropriate action?

Show answer & explanation

Correct answer: A

  • A. Route traffic back to the previous stable version (roll back) and investigate before proceeding

The point of a canary is to limit the blast radius. When errors rise, roll traffic back to the stable version and investigate before continuing. Moving 100% of traffic to the failing version just to get a bigger sample exposes every user to the errors. Writing the errors off as cold-start noise and continuing the rollout ignores a real warning sign and harms users. Deleting and recreating the endpoint causes an outage, and it still leaves the faulty version serving traffic.

Question 20 · Model Deployment

Which factors should MOST influence the choice between batch, streaming, and real-time serving for a model?

Show answer & explanation

Correct answer: D

  • D. Required latency, throughput/volume, and cost — match the paradigm to how quickly predictions are needed

Deployment choice is driven by latency needs (real-time vs overnight), throughput/volume, and cost. The training framework doesn't lock a model to one paradigm, since MLflow models can be used in batch, streaming, or serving. The number of experiments or runs has nothing to do with the deployment paradigm. Validation accuracy measures model quality, not how quickly predictions are needed.

Pick an answer on each question to check it. 20 questions in this test.

38 more Databricks Machine Learning Professional questions

Sign up free to start practising, or subscribe (from $4.97/mo) for the full 58-question bank, flashcards.

Databricks Machine Learning Professional course overview and study guides →