databricks Data Engineer Associate · Practice questions

Section 4: Working with Lakeflow Jobs Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

An If/else condition task compares {{job.parameters.env}} == 'prod'. What does the task do?

  1. It fails the job when the value is not prod
  2. It changes the job's target environment
  3. It deploys the bundle to production
  4. It routes execution to the true or false branch — Correct

Correct answer

It routes execution to the true or false branch

Explanation

Condition tasks evaluate comparisons on parameters or task values and control which dependent tasks run.

Question 2

A job has a SQL task that runs a query against a SQL warehouse to refresh a summary table. Which statement is correct?

  1. SQL tasks require a notebook wrapper
  2. They run SQL on a SQL warehouse — Correct
  3. SQL tasks run on the job cluster's driver only
  4. SQL tasks can only read data, not write

Correct answer

They run SQL on a SQL warehouse

Explanation

SQL tasks execute saved queries, SQL files, dashboards or alerts on a SQL warehouse.

Question 3

A job must branch: if the row count of new data is zero, skip the transformation tasks; otherwise run them. Which task type supports this?

  1. Dashboard task
  2. Python wheel task
  3. Run Job task with a row count parameter
  4. If/else condition task — Correct

Correct answer

If/else condition task

Explanation

An If/else condition task evaluates a condition (for example on a task value or parameter) and routes execution to the true or false branch.

Question 4

A cleanup task must run after two upstream tasks finish, whether they succeed or fail. Which Run if condition should be used for the cleanup task?

  1. At least one succeeded
  2. None failed
  3. All done — Correct
  4. All succeeded

Correct answer

All done

Explanation

All done runs the task once all dependencies have completed, regardless of their outcome.

Question 5

Which statement about the job queue setting is correct?

  1. Runs blocked by concurrency limits are queued, not skipped — Correct
  2. It disables retries
  3. It queues files for Auto Loader
  4. It sends job results to a message queue

Correct answer

Runs blocked by concurrency limits are queued, not skipped

Explanation

Job queueing holds runs until capacity is available, rather than skipping them when the concurrency limit is reached.

Question 6

A data engineer wants to reuse an existing ingestion job as a step in a larger orchestration job. Which task type is appropriate?

  1. Run Job task — Correct
  2. Notebook task with %run
  3. Pipeline task
  4. For each task

Correct answer

Run Job task

Explanation

Run Job tasks trigger another job, allowing jobs to be composed into larger workflows.

Question 7

A job failed on its fourth task out of seven because of a bug that has now been fixed. The first three tasks took two hours. What is the most efficient way to complete the run?

  1. Start a new run of the whole job
  2. Clone the job and delete the first three tasks
  3. Run the remaining notebooks manually on an all-purpose cluster
  4. Repair the run, which reruns only the failed and skipped tasks — Correct

Correct answer

Repair the run, which reruns only the failed and skipped tasks

Explanation

Repair run reruns failed tasks and their dependents in the same job run, reusing successful task results.

Question 8

When is a time-based schedule a better choice than a data-driven trigger?

  1. When results are needed at a fixed time, like a 06:00 report — Correct
  2. When another team's table update should start the job
  3. When the data arrives at unpredictable times and should be processed as soon as possible
  4. When files land in a volume in bursts throughout the day

Correct answer

When results are needed at a fixed time, like a 06:00 report

Explanation

Fixed schedules suit time-bound deliverables. Data-driven triggers (file arrival or table update) suit unpredictable arrivals.

Question 9

A team wants jobs to fail fast if a task hangs, instead of running indefinitely. What should be configured?

  1. A table update trigger
  2. A timeout on the task or job — Correct
  3. More workers on the cluster
  4. A higher max retries value on every task

Correct answer

A timeout on the task or job

Explanation

Timeouts stop tasks or jobs that exceed a set duration, which then fail (and can be retried).

Question 10

A job uses job-level parameters such as env and run_date. How does a notebook task read the value of run_date?

  1. With spark.conf.get('run_date')
  2. dbutils.widgets.get('run_date') — Correct
  3. With os.environ['run_date'] on the driver
  4. Job parameters cannot be read by notebooks

Correct answer

dbutils.widgets.get('run_date')

Explanation

Job parameters are pushed down to tasks; notebook tasks read them as widgets using dbutils.widgets.get.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz