Data Engineer Professional · 22% of the exam

Developing Code for Data Processing using Python and SQL: free practice questions

5 sample questions from our 60-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Databricks exam.

1. A Databricks administrator runs the following command to grant a privilege in Unity Catalog: ```sql GRANT SELECT ON TABLE prod.finance.ledger TO `reporting_group`; ``` Later, the admin discovers that members of `reporting_group` still cannot query the table. Assuming the GRANT statement executed without error, what is the MOST LIKELY reason the users cannot query the table?

  • A. SELECT privilege must be granted at the catalog level, not the table level.
  • B. The group also needs USE CATALOG on `prod` and USE SCHEMA on `prod.finance`.✓ Correct
  • C. Unity Catalog requires granting READ FILES instead of SELECT for table access.
  • D. The GRANT statement is invalid because group names must be quoted with single quotes, not backticks.
Explanation

In Unity Catalog, granting SELECT on a table alone is insufficient. Users must also have USE CATALOG privilege on the parent catalog and USE SCHEMA privilege on the parent schema before they can access any object within them. Option A is incorrect because SELECT can be granted at the table level. Option C is incorrect because READ FILES is used for external locations/volumes, not tables. Option D is incorrect because backtick quoting for identifiers is valid in Databricks SQL.

2. A Databricks administrator defines the following cluster policy JSON snippet: ```json { "node_type_id": { "type": "fixed", "value": "i3.xlarge" }, "autoscale.min_workers": { "type": "range", "minValue": 1, "maxValue": 4 }, "spark_conf.spark.databricks.delta.preview.enabled": { "type": "fixed", "value": "true", "hidden": true } } ``` A data scientist uses this policy to create a cluster. Which of the following outcomes correctly describes the cluster's behavior?

  • A. The data scientist can choose any node type but is limited to between 1 and 4 workers.
  • B. The cluster will always use `i3.xlarge` nodes, can scale between 1 and 4 workers, and the Delta preview Spark config is set but not visible to the user in the cluster creation UI.✓ Correct
  • C. The cluster will always use `i3.xlarge` nodes, but the data scientist can set autoscaling min workers to 0 since only the max is restricted.
  • D. The `hidden: true` flag causes the Spark config to be excluded from the cluster entirely; it is only used for policy documentation purposes.
Explanation

In a cluster policy, `type: fixed` locks a value so users cannot change it. `type: range` restricts a numeric value within min/max bounds. `hidden: true` means the fixed value is applied to the cluster but is not shown in the cluster creation UI, preventing users from seeing or overriding it. Therefore: the node type is locked to `i3.xlarge`, workers must be between 1 and 4, and the Delta config is silently applied. Option A is wrong — node type is `fixed`, not user-configurable. Option C is wrong — `minValue: 1` means the minimum is restricted to at least 1; 0 is outside the allowed range. Option D is wrong — `hidden: true` does not exclude the config; it applies it invisibly.

3. A data platform team uses Databricks Workflows to orchestrate a multi-task job with the following task dependency chain: Task A → Task B → Task C. Task B fails during a nightly run, causing Task C to be skipped. After fixing the bug in Task B's notebook, what is the MOST efficient way to resume the job without re-running Task A?

  • A. Trigger a full new run of the job from the beginning
  • B. Manually run Task B and Task C as separate notebook jobs
  • C. Use the 'Repair Run' feature in Databricks Workflows, selecting only the failed and skipped tasks to re-run✓ Correct
  • D. Delete the failed run and create a new job run starting from Task B
Explanation

Databricks Workflows' 'Repair Run' feature allows you to re-run only the failed task and any downstream tasks that were skipped as a result, without re-running tasks that already succeeded. This is the most efficient approach. Option A wastes compute by re-running Task A unnecessarily. Option B is operationally complex and loses the job run context, audit trail, and dependency management. Option D is not a valid Databricks Workflows feature — you cannot start a job run from an arbitrary task in a new run.

4. When reading a Delta table for a batch transformation, which is TRUE about Spark's execution?

  • A. Transformations are lazily evaluated and only execute when an action (e.g., write, count, collect) is triggered✓ Correct
  • B. Every transformation executes immediately as written
  • C. Transformations always run on the driver only
  • D. Spark cannot read Delta tables
Explanation

Spark uses lazy evaluation: transformations build a logical plan and execute only when an action triggers a job, enabling optimization. Immediate execution (B) is eager (not Spark's model), transformations run distributed on executors (C), and Spark reads Delta natively (D).

5. A Structured Streaming query reads from a Delta table and must process only NEW data on each run without reprocessing everything. What makes this possible?

  • A. Checkpointing, which tracks the streaming progress (offsets) so processing resumes incrementally✓ Correct
  • B. Reading the entire table every trigger
  • C. Disabling the checkpoint to save space
  • D. Using a static batch read each time
Explanation

A checkpoint location stores the stream's progress (offsets/state), so each trigger processes only new data and can recover after failure. Rereading the whole table (B) and static batch reads (D) reprocess everything, and disabling the checkpoint (C) breaks incremental/exactly-once processing.

55 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free
Developing Code for Data Processing using Python and SQL — Free Data Engineer Professional Practice Questions | DataCertPrep — Certification Prep