Databricks ML Professional Sample Questions

About these questions

These five questions are original. We wrote them in the style of the skills in the Databricks exam guide, with the domains roughly in proportion to their weights: two on Model Development, two on MLOps, and one on Model Deployment. They are not real exam questions, and the real exam will word things differently.

How to use these

Try each question without looking at your notes, and choose an answer before you open the explanation. Then read the explanation even when you were right, because the reason the closest wrong option fails is where the learning is. Note any domain where you slipped and revisit it on the domains explained page.

Question 1 (Model Development)

A forecasting job trains one model per warehouse by calling `groupBy(“warehouse_id”).applyInPandas(…)`. It finishes for most warehouses but fails with out-of-memory errors on the two largest ones. What is the most likely explanation?

  • A. Spark refuses to process groups when the grouping keys are skewed.
  • B. The function is missing a pandas UDF type hint.
  • C. The rows of each group are passed to the function together as one pandas DataFrame, so a very large group must fit in a single executor’s memory.
  • D. The output schema declares too many columns.
Show the answer and explanation

Correct answer: C. With the grouped-map style of the pandas Function API, Spark gathers every row of a group into one pandas DataFrame on one executor. A handful of huge groups can therefore exhaust memory even when the whole dataset is modest. Remedies include a larger worker type, passing fewer columns, aggregating first, or splitting very large groups. Option A is the closest wrong answer: skewed keys are allowed, they just produce groups of very different sizes. Option B is wrong because type hints are optional here and have no effect on memory, and option D describes a schema choice that does not cause memory trouble for only the largest groups.

Question 2 (Model Development)

A nightly scoring pipeline includes a `StringIndexer` that was fitted on last year’s orders. Last night a new product category, “gift_card”, appeared and the job failed with an error about an unseen label. The team wants those rows to be scored, with unknown categories treated as one extra category. Which change should they make?

  • A. Set `handleInvalid` to `”skip”`.
  • B. Set `handleInvalid` to `”keep”`.
  • C. Set `stringOrderType` to `”alphabetAsc”`.
  • D. Change `outputCol` to a new column name.
Show the answer and explanation

Correct answer: B. By default the indexer raises an error on a label it did not see during fitting. Setting `handleInvalid` to `”keep”` assigns all unseen labels to one additional index, so the rows stay in the data and are scored. Option A, `”skip”`, also stops the error, but it removes those rows from the output, which the team does not want. Option C only changes how indices are ordered for known labels, and option D only renames the result column, so neither changes how unseen labels are handled.

Question 3 (MLOps)

A Unity Catalog model named `main.churn.predictor` has a newly validated version 7. Nightly batch jobs load the model with the URI `models:/main.churn.predictor@champion`. The team wants these jobs to use version 7 without editing them. Which action achieves this?

  • A. Add a tag `current=true` to version 7.
  • B. Call `transition_model_version_stage` to move version 7 to a Production stage.
  • C. Call `set_registered_model_alias` so that the alias `champion` points to version 7.
  • D. Create another model version from the same source.
Show the answer and explanation

Correct answer: C. In Unity Catalog, promotion means moving an alias. The jobs resolve `@champion` each time they load the model, so repointing the alias to version 7 redirects them on their next run with no code change. Option B is the closest wrong answer: stage transitions belong to the legacy workspace registry, not to Unity Catalog. Tags are useful for recording validation status, but a model URI does not resolve them (option A), and creating another version does not tell any consumer which version to load (option D).

Question 4 (MLOps)

A table receives hourly sensor readings. The team wants a Lakehouse Monitoring monitor to report metrics separately for each day and each week, instead of one set of metrics for the whole table. Which configuration fits?

  • A. An inference profile with a model identifier column.
  • B. A snapshot profile that refreshes once a day.
  • C. A baseline table with one row per day and per week.
  • D. A time series profile with a timestamp column and day and week granularities.
Show the answer and explanation

Correct answer: D. A time series profile windows the data on a timestamp column and produces a set of metrics for each window at every granularity you configure, here one day and one week. A snapshot profile (option B) recomputes over the entire table on each refresh, however often that happens, so it has no windows. An inference profile (option A) is meant for logged requests and predictions. A baseline table (option C) provides a reference distribution to compare against, not the windows in which metrics are reported.

Question 5 (Model Deployment)

A model serving endpoint named `fraud-scorer` serves version 3 of a model. Version 4 has passed validation. Several client applications call the endpoint’s URL, and the team wants to start serving version 4 without changing that URL or taking the endpoint offline. What should they do?

  • A. Delete the endpoint and create it again with version 4.
  • B. Create an endpoint with a new name and ask every client to switch.
  • C. Register version 4 and rely on all endpoints that use the model to update themselves.
  • D. Update the existing endpoint’s configuration with a served entity for version 4.
Show the answer and explanation

Correct answer: D. Updating an endpoint means submitting a new configuration, with its served entities and traffic settings, to the existing endpoint. The endpoint keeps its name and URL while Databricks provisions the new configuration and switches traffic. This is also how a canary or blue-green rollout is expressed, as a configuration change. Option A causes avoidable downtime. Option B works but forces every client to change, which the team wants to avoid. Option C is wrong because registering a version does not push it onto any endpoint automatically.

Next step

If you missed a question, find its topic on the domains explained page and review it. For more practice at exam length, see the Databricks ML Professional practice tests, which are original and explained answer by answer.