Home / Databricks Certified Machine Learning Associate / Mock exam
Databricks Certified Machine Learning Associate Exam-style mock test

Databricks Certified Machine Learning Associate Practice Exams|Practice test

Full explanations Exam format Pass line 70%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · Databricks ML Fundamentals and Workspace
A data scientist at a B2B SaaS analytics company logs into Databricks and switches the workspace persona to Machine Learning using the persona selector in the sidebar. Which set of capabilities becomes most readily surfaced by choosing this persona?
✓Experiments, the Model Registry, and model serving entry points are promoted in navigation
Correct. The Machine Learning persona reorganizes the sidebar to highlight ML-specific tools such as Experiments, the Model Registry, the Feature Store, and model serving.
・Only SQL dashboards and the interactive query editor are made available to the signed-in user
Incorrect. SQL dashboards and the query editor belong to the SQL persona, not the Machine Learning persona.
・Delta Live Tables pipelines replace all notebook functionality in the workspace
Incorrect. Switching personas changes navigation emphasis and does not remove or replace notebook functionality with pipelines.
・The ability to create clusters is removed from the account entirely
Incorrect. The persona is only a UI view; it never revokes cluster creation permissions, which are governed by account policies.
Explanation
Personas are a navigation convenience. The Machine Learning persona surfaces the ML lifecycle tools most relevant to data scientists.
Example2 · Data Preparation and Feature Engineering
A data scientist at a B2B SaaS company is preparing a churn dataset in a Databricks notebook. The 'monthly_api_calls' numeric column has roughly 12% missing values that appear to be missing because small accounts never hit the API. The team wants a reproducible, scalable fill that runs on the full Spark DataFrame without collecting to the driver. Which approach best fits?
✓Use the Spark ML Imputer transformer configured with the median strategy on the column
Correct. The Spark ML Imputer runs distributed across the cluster and the median strategy is robust for skewed usage counts, giving a reproducible fit/transform pipeline.
・Collect the full column to a Pandas Series on the driver and call fillna with the mean
Incorrect. Collecting a full column to the driver as Pandas defeats scalability and can crash the driver on large datasets.
・Drop every row that contains any null value from the dataset entirely
Incorrect. Dropping 12% of rows discards informative small-account signal and shrinks the training set unnecessarily.
・Replace nulls with a very large sentinel like 999999999 so the model keys on magnitude
Incorrect. A huge sentinel distorts the feature distribution and scaling, misleading the model rather than encoding missingness cleanly.
Explanation
Spark ML's Imputer provides a distributed, reproducible transformer; median handles skewed count data well without driver collection.
Example3 · Model Training, Tuning, and AutoML
A data scientist at a B2B SaaS company is building a churn model on a Databricks cluster. They assemble feature columns into a single vector and create a LogisticRegression estimator. To obtain a trained model object they can later use for scoring, what must they do with the estimator?
・Call transform() on the unfitted estimator with the training DataFrame to produce the fitted model
Incorrect. transform() is called on a fitted model (a transformer), not on an unfitted estimator, and it generates predictions rather than training.
✓Call fit() on the estimator with the training DataFrame, which returns a model transformer
Correct. In Spark ML an estimator is trained by calling fit() with the training data, which returns a fitted model that is itself a transformer used for scoring.
・Pass the estimator into a Pipeline and call transform() on raw data
Incorrect. A Pipeline is also an estimator and must have fit() called on it; transform() alone will not train the stages.
・Register the estimator in Unity Catalog so it becomes callable
Incorrect. Registering a model in Unity Catalog is about governance and deployment, not about producing a fitted model from an estimator.
Explanation
The core Spark ML pattern is estimator.fit(data) -> model, and model.transform(data) -> predictions. Training always happens through fit().
Example4 · MLflow: Tracking, Models, and Registry
A data scientist at a healthcare services firm is training a readmission-risk model inside a Databricks notebook. She wants MLflow to automatically capture the model's hyperparameters, training metrics, and the fitted model without adding explicit log_param or log_metric calls for her scikit-learn estimator. Which approach accomplishes this with the least code?
✓Call mlflow.sklearn.autolog() before fitting the estimator so parameters, metrics, and the model are logged automatically
Correct. Enabling mlflow.sklearn.autolog() instruments the fit call so parameters, metrics, and the model artifact are logged automatically without explicit logging statements.
・Manually iterate over the estimator's get_params() output and log each one
Incorrect. Iterating over get_params() and logging each one is exactly the manual effort autologging is designed to eliminate.
・Set the MLFLOW_TRACKING_URI environment variable to the workspace endpoint
Incorrect. Setting the tracking URI only tells MLflow where to send data; it does not automatically capture parameters or metrics from the estimator.
・Wrap the training call in mlflow.start_run() and rely on the run context alone
Incorrect. start_run() opens a run but does not by itself capture any hyperparameters, metrics, or the model.
Explanation
Flavor-specific autologging (mlflow.sklearn.autolog) is the lowest-code way to automatically capture params, metrics, and the model during a fit call.
Example5 · Deployment, Inference, and Monitoring
A healthcare services firm needs to score 40 million patient claims records overnight for fraud risk. The model is registered in MLflow and the records sit in a Delta table. The team wants the most scalable approach on their Databricks cluster. Which deployment pattern should they choose?
✓Load the registered model as a Spark UDF with mlflow.pyfunc.spark_udf and apply it across the full Delta DataFrame
Correct. A Spark UDF created with mlflow.pyfunc.spark_udf distributes inference across executors, making it the scalable batch pattern for a large Delta table.
・Deploy the model to a real-time serving endpoint and loop through each record with REST calls
Incorrect. Real-time endpoints are for low-latency single requests; looping millions of REST calls overnight is slow and inefficient.
・Collect the DataFrame to the driver with toPandas and call model.predict once
Incorrect. Collecting 40 million records to the driver with toPandas risks out-of-memory failures and abandons distributed compute.
・Export the model to ONNX and run single-threaded inference on the driver node
Incorrect. Single-threaded driver inference on the driver node does not scale to tens of millions of records.
Explanation
Batch inference over a large Delta table is best handled by a distributed Spark UDF from the registered MLflow model, which parallelizes scoring across the cluster.
Example6 · Databricks ML Fundamentals and Workspace
A data scientist at a healthcare services firm logs in to Databricks and switches to the Machine Learning persona from the workspace sidebar to begin a patient readmission modeling project. Which set of capabilities does switching to this persona primarily surface compared with the default Data Science & Engineering view?
・Billing dashboards, account-level user provisioning, workspace network configuration, and identity federation controls managed in the account console
Incorrect. Those are account console and admin functions, not what the ML persona surfaces for a data scientist.
✓Experiments, the Model Registry, Feature Store, and AutoML entry points tailored to the ML lifecycle
Correct. The Machine Learning persona exposes MLflow Experiments, the Model Registry, Feature Store, and AutoML so users can work across the ML lifecycle.
・Only the SQL editor and SQL warehouse endpoints used for ad hoc analytics reporting
Incorrect. The SQL editor and warehouses belong to the Databricks SQL persona, not the Machine Learning persona.
・A read-only catalog browser without the ability to attach notebooks to compute clusters
Incorrect. The ML persona retains full notebook and compute access; it is not a read-only browser.
Explanation
The Machine Learning persona reorganizes the sidebar to foreground MLflow Experiments, the Model Registry, Feature Store, and AutoML, which are the building blocks of the ML lifecycle.
Example7 · Databricks ML Fundamentals and Workspace
A data scientist at UrbanThread, an apparel retailer, is launching a cluster to train a scikit-learn model that predicts weekly demand for each store. They want preinstalled machine learning libraries without manually running pip for common packages. Which Databricks runtime should they select for the cluster?
✓Databricks Runtime for Machine Learning
Correct. Databricks Runtime for Machine Learning bundles common ML libraries such as scikit-learn, XGBoost, and MLflow preinstalled, avoiding manual package setup.
・Standard Databricks Runtime
Incorrect. The standard runtime includes Spark and core data tools but does not preinstall the full ML library stack, so packages like XGBoost would need manual installation.
・Photon-enabled Databricks Runtime
Incorrect. Photon accelerates SQL and DataFrame workloads but is not the runtime variant that ships the preinstalled ML library set.
・Databricks Runtime Light
Incorrect. Runtime Light is a stripped-down option for simple jobs and lacks the preinstalled ML libraries entirely.
Explanation
The ML runtime is purpose-built with popular machine learning packages preinstalled, which is exactly what the scenario requires.
Example8 · Databricks ML Fundamentals and Workspace
An analyst at UrbanThread needs to review the parameters, metrics, and artifacts logged across all recent training runs for a churn model. Which area of the Databricks workspace should they open to see these grouped runs?
✓The Experiments page
Correct. The Experiments page is where MLflow organizes training runs with their logged parameters, metrics, and artifacts for comparison.
・The Compute page listing clusters
Incorrect. The Compute page manages clusters and shows their status, not the logged results of model training runs.
・The Catalog Explorer showing tables
Incorrect. Catalog Explorer browses data assets like tables and schemas, not the MLflow run history.
・The Jobs page listing workflows
Incorrect. The Jobs page shows workflow schedules and execution status, not the grouped experiment runs with metrics and artifacts.
Explanation
MLflow tracking surfaces runs within Experiments, making it the correct place to inspect parameters, metrics, and artifacts.
Example9 · Databricks ML Fundamentals and Workspace
In a Python notebook at UrbanThread, a data scientist has a transformation that is far simpler to express as a SQL query against a Delta table. They want to run a single SQL statement in one cell without converting the whole notebook to SQL. What should they place at the top of that cell?
✓%sql
Correct. The %sql magic command switches a single cell to SQL execution while keeping the rest of the notebook in Python.
・%python
Incorrect. %python forces a cell to Python, which is the notebook default here and would not let them run SQL.
・%sh
Incorrect. %sh runs a shell command on the driver node, not a SQL query against a Delta table.
・%md
Incorrect. %md renders the cell as Markdown text and executes no code at all.
Explanation
Language magic commands let a single cell run in a different language; %sql is the one for SQL.
Example10 · Databricks ML Fundamentals and Workspace
A data science team at a retail bank is spinning up a cluster to train credit-risk models. They want popular ML libraries such as scikit-learn, XGBoost, and TensorFlow preinstalled and GPU drivers configured without manual setup. Which cluster runtime should they select?
・The standard Databricks Runtime, then pip-install each ML library
Incorrect. The standard runtime omits the preinstalled ML stack, forcing manual installs that defeat the goal of zero setup.
✓The Databricks Runtime for Machine Learning
Correct. The ML Runtime ships with scikit-learn, XGBoost, TensorFlow, and configured GPU drivers out of the box.
・The Databricks Light runtime to minimize cluster startup cost
Incorrect. Databricks Light is a lightweight runtime for jobs and lacks the curated ML library stack.
・A Photon-enabled SQL warehouse configured for notebook attachment
Incorrect. A SQL warehouse serves SQL analytics and cannot host the Python ML training libraries the team needs.
Explanation
The Databricks Runtime for Machine Learning bundles common ML libraries and GPU support so teams avoid manual environment configuration.
Example11 · Databricks ML Fundamentals and Workspace
A quantitative analyst at an investment firm is prototyping a fraud-scoring model in a Databricks notebook that defaults to Python. For a few cells she needs to run SQL directly against a Delta table without changing the notebook's default language. What is the recommended way to do this?
・Create a separate SQL notebook and copy results back into the Python notebook
Incorrect. Maintaining a separate notebook and copying results is error-prone and unnecessary given cell-level language magics.
・Switch the notebook default to SQL, then switch it back each query
Incorrect. Repeatedly toggling the default language is cumbersome and risks running cells in the wrong language.
✓Add the %sql magic command to the specific cells that should run SQL
Correct. The %sql magic command lets individual cells run SQL while the notebook default stays Python.
・Export the Delta table to CSV and read it with pandas instead of querying
Incorrect. Exporting to CSV bypasses Delta's benefits and does not meet the requirement to run SQL.
Explanation
Language magic commands like %sql, %python, and %scala let a single notebook mix languages at the cell level without changing the default.
Example12 · Databricks ML Fundamentals and Workspace
A data scientist at a regional industrial-parts distributor is iterating on a demand-forecasting notebook in the Databricks workspace, running cells one at a time and inspecting intermediate DataFrames. Which compute resource should they attach the notebook to for this exploratory work?
✓An all-purpose interactive cluster the team can share and attach notebooks to
Correct. All-purpose (interactive) clusters are designed for ad-hoc analysis, collaborative notebook attachment, and iterative development.
・A job cluster that is created and terminated automatically by a scheduled workflow
Incorrect. Job clusters spin up for an automated run and terminate afterward, so they cannot host an interactive editing session.
・A SQL warehouse dedicated exclusively to BI dashboard refresh queries
Incorrect. SQL warehouses execute SQL for BI tools and do not run Python notebook cells interactively.
・A Delta Live Tables pipeline cluster provisioned only for streaming ingestion
Incorrect. A DLT pipeline cluster serves a declarative pipeline, not free-form notebook exploration.
Explanation
Interactive, cell-by-cell notebook development is the exact use case for an all-purpose cluster.
Example13 · Databricks ML Fundamentals and Workspace
The ML team maintaining the distributor's inventory-optimization models wants their notebooks tracked in Git so pull requests can be reviewed before merging. Which Databricks feature directly supports syncing workspace notebooks with a remote Git repository?
✓The Databricks Repos Git feature
Correct. Databricks Repos integrates the workspace with remote Git providers so notebooks can be committed, branched, and merged.
・The DBFS root storage mount location
Incorrect. The DBFS root is a file store and provides no Git branching or pull-request workflow.
・Unity Catalog governed volumes
Incorrect. Unity Catalog volumes manage governed non-tabular files, not source-code version control.
・The cluster event log
Incorrect. The cluster event log records compute lifecycle events, unrelated to code versioning.
Explanation
Databricks Repos is the built-in Git integration for version-controlling notebooks and code.
Example14 · Databricks ML Fundamentals and Workspace
A telecom operator's data science team wants a single environment where they can explore churn data, train models, and manage experiment runs without switching tools. Which Databricks product persona should they select to surface machine-learning-specific features such as the experiment tracking and model registry entry points in the left navigation?
✓The Machine Learning persona, which exposes experiments, features, models, and compute tailored for ML work
Correct. The Machine Learning persona reorganizes the workspace navigation to surface experiments, the feature store, the model registry, and ML compute in one place.
・The SQL persona, which is designed primarily for running business intelligence dashboards and large-scale data warehouse queries
Incorrect. The SQL persona centers on warehouse queries and dashboards, not experiment tracking or the model registry.
・The Data Engineering persona, which focuses on building scheduled jobs and pipelines
Incorrect. The Data Engineering persona emphasizes jobs and pipelines rather than ML experiment and model management.
・The Admin console, which manages users and workspace billing settings
Incorrect. The Admin console governs users and billing and does not provide the ML workflow navigation the team needs.
Explanation
Selecting the Machine Learning persona reorganizes the Databricks workspace so ML-specific entry points like experiments and models are directly accessible.
Example15 · Databricks ML Fundamentals and Workspace
A telecom analyst is interactively developing a churn notebook and repeatedly attaching it to run cells while tuning features. Which compute choice best fits this interactive, iterative development pattern on Databricks?
・A job cluster created at task launch and terminated when the run finishes
Incorrect. A job cluster spins up for a scheduled run and tears down afterward, which does not suit repeated interactive editing.
✓An all-purpose cluster that the analyst attaches to the notebook for interactive, repeated cell execution while tuning
Correct. An all-purpose cluster is intended for interactive notebook work where the analyst attaches and runs cells repeatedly.
・A SQL warehouse configured only for serving BI dashboards to business users
Incorrect. A SQL warehouse serves SQL and BI workloads, not Python notebook ML development.
・A terminated cluster that stays stopped so no compute cost is incurred
Incorrect. A terminated cluster cannot execute any cells, so no interactive development can occur.
Explanation
All-purpose clusters are built for interactive, collaborative notebook development, while job clusters are optimized for automated, scheduled runs.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)