DP-750

Free DP-750 practice questions

10 questions from our DP-750 practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the DP-750 practice exams

Question 1 of 10, Set up and configure an Azure Databricks environment

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?

  1. AAn instance pool attached to an existing all-purpose cluster so idle VMs are reused between runs
  2. BAn all-purpose cluster shared by the team, with auto termination set to 10 minutes after the last command
  3. CJob compute defined in the task's cluster settings with the required node type, ended after the run Correct answer
  4. DA serverless SQL warehouse sized Small with auto stop configured for the shortest allowed interval

Answer and 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, Set up and configure an Azure Databricks environment. 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.)

  1. AA dedicated catalog such as prod_shared that holds only objects curated for external sharing Correct answer
  2. BSeparate metastores per environment in the same region to keep names identical
  3. CEnvironment-prefixed catalogs such as dev_sales and prod_sales, each bound to its own workspace Correct answer
  4. DTable names suffixed with _dev and _prod in a single shared schema for every team
  5. EOne catalog named sales with schemas dev, test and prod, shared with partners as a whole

Answer and 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, Secure and govern Unity Catalog objects

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?

  1. ACreate an Azure Key Vault-backed secret scope and read the key with dbutils.secrets.get Correct answer
  2. BStore the key as a Spark configuration value on the cluster and read it with spark.conf.get
  3. CSave the key in a Unity Catalog volume and restrict READ VOLUME to the engineering group
  4. DStore the key in a notebook widget default value and hide the widget panel from viewers

Answer and 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, Secure and govern Unity Catalog objects

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?

  1. AA DEEP CLONE of the table refreshed hourly into an external location that the partner registers as an external table
  2. BDatabricks-to-Databricks Delta Sharing using the partner's metastore sharing identifier Correct answer
  3. CExport the table nightly to Parquet in a storage account shared with a SAS token
  4. DOpen Delta Sharing with a bearer token credential file sent by email

Answer and 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, Prepare and process data

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?

  1. Adf.withWatermark('event_time', '10 minutes').dropDuplicatesWithinWatermark(['event_id']) Correct answer
  2. Bdf.dropDuplicates(['event_id']) on the stream without a watermark, relying on the checkpoint
  3. Cdf.groupBy('event_id').count() written in complete output mode to the sink
  4. Ddf.distinct() on the stream before writing

Answer and 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, Prepare and process data. 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.)

  1. AWHEN NOT MATCHED BY SOURCE THEN UPDATE SET t.is_active = false
  2. BWHEN MATCHED AND s.id IS NULL THEN DELETE
  3. CWHEN NOT MATCHED BY TARGET THEN DELETE
  4. DWHEN NOT MATCHED BY SOURCE THEN DELETE Correct answer
  5. EWHEN NOT MATCHED THEN INSERT * Correct answer

Answer and 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, Prepare and process data

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?

  1. ACONSTRAINT valid_amount EXPECT (amount >= 0)
  2. BCONSTRAINT valid_amount EXPECT (amount >= 0) ON VIOLATION DROP ROW Correct answer
  3. CCONSTRAINT valid_amount CHECK (amount >= 0) NOT ENFORCED
  4. DCONSTRAINT valid_amount EXPECT (amount >= 0) ON VIOLATION FAIL UPDATE

Answer and 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, Deploy and maintain data pipelines and workloads

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?

  1. Aimport child as a Python module from the workspace folder and call its main function
  2. Bdbutils.notebook.run('./child', 600, {'date': d}) with dbutils.notebook.exit in each child Correct answer
  3. C%run ./child with the parameters set as Python variables in the parent notebook beforehand
  4. Dspark.sql("RUN NOTEBOOK './child'") with the parameters passed as SQL variables

Answer and 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, Deploy and maintain data pipelines and workloads

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?

  1. AIn the cluster configuration, with spark.task.maxFailures set to three for the job cluster
  2. BIn a pipeline expectation that drops rows from failed API calls
  3. CIn the notebook, using try/except with retries and backoff, then raising after the last try Correct answer
  4. DIn the job, as a task retry policy of three retries with a long minimum interval between them

Answer and 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, Deploy and maintain data pipelines and workloads

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?

  1. AA scheduled trigger with a cron expression that runs every minute
  2. BA file arrival trigger on the external location path in ADLS Correct answer
  3. CAn Azure Event Grid subscription that calls the Jobs API run-now endpoint
  4. DA continuous trigger so that the job is always running

Answer and 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.