# Free DP-750 practice questions

> 10 free DP-750 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/microsoft-dp-750/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/microsoft-dp-750/

### Question 1 of 10

A team runs a nightly notebook task from Lakeflow Jobs. The task must run on compute that is created when the run starts and released when it ends, and the team wants to keep using classic compute with a custom node type. Which compute type should the job task use?

- A. An instance pool attached to an existing all-purpose cluster so idle VMs are reused between runs
- B. An all-purpose cluster shared by the team, with auto termination set to 10 minutes after the last command
- C. Job compute defined in the task's cluster settings with the required node type, ended after the run
- D. A serverless SQL warehouse sized Small with auto stop configured for the shortest allowed interval

**Answer:** C

**Explanation:** Job compute is created for the job run and terminated when the run completes, and it lets you choose node types on classic compute. An all-purpose cluster is interactive compute that costs more per DBU and lingers until auto termination. A SQL warehouse runs SQL, not general notebook tasks with custom node types. An instance pool only speeds up node acquisition; attaching it to an all-purpose cluster still leaves an interactive cluster running the job.

### Question 2 of 10 (choose 2)

A company runs dev, test and prod workspaces against one metastore. External partners will later receive curated data through Delta Sharing. The team must define catalog naming and layout. Which design BEST supports isolation and future sharing? (Choose two.)

- A. A dedicated catalog such as prod_shared that holds only objects curated for external sharing
- B. Separate metastores per environment in the same region to keep names identical
- C. Environment-prefixed catalogs such as dev_sales and prod_sales, each bound to its own workspace
- D. Table names suffixed with _dev and _prod in a single shared schema for every team
- E. One catalog named sales with schemas dev, test and prod, shared with partners as a whole

**Answer:** A, C

**Explanation:** Per-environment catalogs bound to workspaces isolate environments while keeping schema and table names stable, and a separate catalog for curated shared objects keeps sharing scope explicit. Putting environments in one catalog and sharing it risks exposing dev data. Suffixes mix environments in one securable. Workspaces in a region attach to one metastore, so per-environment metastores in one region are not an option.

### Question 3 of 10

A notebook must read a storage account key stored in Azure Key Vault without placing the key in code. The key must also be redacted if someone prints it in the notebook output. What should the data engineer do?

- A. Create an Azure Key Vault-backed secret scope and read the key with dbutils.secrets.get
- B. Store the key as a Spark configuration value on the cluster and read it with spark.conf.get
- C. Save the key in a Unity Catalog volume and restrict READ VOLUME to the engineering group
- D. Store the key in a notebook widget default value and hide the widget panel from viewers

**Answer:** A

**Explanation:** An Azure Key Vault-backed secret scope exposes Key Vault secrets to Databricks, and dbutils.secrets.get returns the value while Databricks redacts it in notebook output. A plain Spark configuration value is visible to anyone who can view the cluster. A file in a volume is readable as plain text by anyone with READ VOLUME. A widget default value is stored with the notebook in clear text.

### Question 4 of 10

A partner uses Databricks on a different cloud and a different Unity Catalog metastore. They must query a live gold table without copies, and access must be governed by Unity Catalog on both sides. Which approach should be used?

- A. A DEEP CLONE of the table refreshed hourly into an external location that the partner registers as an external table
- B. Databricks-to-Databricks Delta Sharing using the partner's metastore sharing identifier
- C. Export the table nightly to Parquet in a storage account shared with a SAS token
- D. Open Delta Sharing with a bearer token credential file sent by email

**Answer:** B

**Explanation:** Databricks-to-Databricks Delta Sharing uses the recipient metastore's sharing identifier; no token is exchanged and the share is governed in both metastores. Open sharing with a bearer token is for non-Databricks recipients and requires securing the credential. An hourly deep clone and a nightly Parquet export both create copies that are not live and leave the provider's governance.

### Question 5 of 10

An ingestion stream from Event Hubs must deduplicate events by event_id because producers retry. Duplicates can arrive up to 10 minutes apart, and state must not grow without bound. Which code is correct?

- A. df.withWatermark('event_time', '10 minutes').dropDuplicatesWithinWatermark(['event_id'])
- B. df.dropDuplicates(['event_id']) on the stream without a watermark, relying on the checkpoint
- C. df.groupBy('event_id').count() written in complete output mode to the sink
- D. df.distinct() on the stream before writing

**Answer:** A

**Explanation:** dropDuplicatesWithinWatermark removes duplicates that arrive within the watermark delay and lets Spark expire old state. dropDuplicates without a watermark keeps every event_id in state forever; the checkpoint persists that state rather than cleaning it. distinct on a stream also needs unbounded state. A complete-mode count keeps all keys and changes the output shape.

### Question 6 of 10 (choose 2)

A daily full snapshot of customers must be loaded into a Delta dimension table in one atomic operation. New customers must be inserted, existing customers updated, and customers missing from the snapshot deleted. The engineer starts with MERGE INTO dim_customer t USING snapshot s ON t.id = s.id WHEN MATCHED THEN UPDATE SET *. Which two clauses must be added? (Choose two.)

- A. WHEN NOT MATCHED BY SOURCE THEN UPDATE SET t.is_active = false
- B. WHEN MATCHED AND s.id IS NULL THEN DELETE
- C. WHEN NOT MATCHED BY TARGET THEN DELETE
- D. WHEN NOT MATCHED BY SOURCE THEN DELETE
- E. WHEN NOT MATCHED THEN INSERT *

**Answer:** D, E

**Explanation:** WHEN NOT MATCHED THEN INSERT adds source rows with no target match, and WHEN NOT MATCHED BY SOURCE THEN DELETE removes target rows missing from the snapshot, all in the same atomic MERGE. Setting is_active to false is a soft delete, which does not meet the requirement to delete. A matched row can never have a null source key, so that DELETE clause never fires. NOT MATCHED BY TARGET rows exist only in the source, so they can only be inserted, not deleted.

### Question 7 of 10

A Lakeflow Spark Declarative Pipelines dataset must drop rows where amount is negative, record how many were dropped, and continue processing. Which SQL constraint should be declared on the streaming table?

- A. CONSTRAINT valid_amount EXPECT (amount >= 0)
- B. CONSTRAINT valid_amount EXPECT (amount >= 0) ON VIOLATION DROP ROW
- C. CONSTRAINT valid_amount CHECK (amount >= 0) NOT ENFORCED
- D. CONSTRAINT valid_amount EXPECT (amount >= 0) ON VIOLATION FAIL UPDATE

**Answer:** B

**Explanation:** An expectation with ON VIOLATION DROP ROW removes invalid records and reports the count in the pipeline event log and metrics while the update continues. Without an ON VIOLATION clause, the expectation only warns and keeps the invalid rows. FAIL UPDATE stops the update when a row violates the expectation. A CHECK constraint is a Delta table constraint that rejects the whole write, and NOT ENFORCED is not valid syntax for it.

### Question 8 of 10

A notebook orchestrates three child notebooks. Each child must run in its own context, receive parameters, and return a status string that the parent inspects. Which method should the parent use?

- A. import child as a Python module from the workspace folder and call its main function
- B. dbutils.notebook.run('./child', 600, {'date': d}) with dbutils.notebook.exit in each child
- C. %run ./child with the parameters set as Python variables in the parent notebook beforehand
- D. spark.sql("RUN NOTEBOOK './child'") with the parameters passed as SQL variables

**Answer:** B

**Explanation:** dbutils.notebook.run starts the child as an ephemeral job in its own context, passes widget parameters, and receives the value given to dbutils.notebook.exit. %run inlines the child into the parent's context and cannot return a value. There is no RUN NOTEBOOK SQL command. Importing a module works for Python files, but notebooks are not run with an isolated context and return status that way.

### Question 9 of 10

A notebook task in a job calls an external REST API that occasionally times out. The team wants the task to retry the API call itself up to three times with backoff, and to fail the task with a clear message only after the final attempt. Where should this logic go?

- A. In the cluster configuration, with spark.task.maxFailures set to three for the job cluster
- B. In a pipeline expectation that drops rows from failed API calls
- C. In the notebook, using try/except with retries and backoff, then raising after the last try
- D. In the job, as a task retry policy of three retries with a long minimum interval between them

**Answer:** C

**Explanation:** Retrying a single API call with backoff belongs in code; re-raising after the final attempt fails the task with a clear error. A task retry policy reruns the whole notebook rather than the single call, and does not give a custom final message. spark.task.maxFailures retries Spark tasks, not driver-side API calls. Expectations validate rows and cannot retry calls.

### Question 10 of 10

A job must start automatically whenever new files arrive in an external location in ADLS Gen2, without polling code and without running on a fixed schedule. Which trigger should be configured?

- A. A scheduled trigger with a cron expression that runs every minute
- B. A file arrival trigger on the external location path in ADLS
- C. An Azure Event Grid subscription that calls the Jobs API run-now endpoint
- D. A continuous trigger so that the job is always running

**Answer:** B

**Explanation:** A file arrival trigger monitors a Unity Catalog external location or volume path and starts the job when new files arrive. A per-minute schedule runs even when no files arrive. A continuous job runs all the time. An Event Grid subscription calling the REST API works but requires building and maintaining custom integration.

Ready for a timed run? Take the free 15-question DP-750 mini exam: https://devopscodelab.com/app/exams/microsoft-dp-750/mini/

DevOpsCode Lab is not affiliated with Microsoft. DP-750 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
