Courseiva

Databricks-DE-Assoc Working with Lakeflow Jobs Practice Question

A data engineer configures a Lakeflow Job to run a notebook task on a job cluster. The notebook reads a parameter named run_date using the widget API. During a manual run, the engineer wants to supply a specific date without editing the notebook. The job also runs on a nightly schedule where the date should default to the current day. Which approach correctly supplies the parameter for both the manual and scheduled runs?

⚠ Common exam trap

The trap here is thinking that a scheduled run cannot use a default while a manual run overrides the same parameter; job parameters support exactly that pattern.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Define a job parameter with a default value and pass it to the notebook task, then override it when starting a manual run.

Job parameters with default values let a task receive a value automatically on schedule, while a manual run can override the same parameter at submission. The notebook consumes it via the widget API, so no code changes are needed between run modes. This is the standard Lakeflow Jobs pattern for dynamic per-run inputs and avoids hard-coding or external stores.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Hard-code the date inside the notebook and create a second notebook for manual runs.

    Why it's wrong here

    Hard-coding the date removes flexibility and forces duplicate notebooks, which creates maintenance drift and defeats parameterization. It cannot supply a different value for a manual run without code changes, and the scheduled run would always use the stale hard-coded value. This approach contradicts the requirement to pass a date dynamically for both manual and scheduled executions.

  • ✗

    Configure the notebook to read the date from a Unity Catalog table that the engineer updates before manual runs.

    Why it's wrong here

    Using a table as a parameter store adds unnecessary coupling and requires writes before each manual run, which is error-prone and slow. It does not leverage the Jobs parameter mechanism and complicates the scheduled path, since the table must always contain a valid value. This indirect approach is not the intended way to pass run-time parameters to a job task.

  • ✗

    Use a cluster environment variable to store the date and change it before each manual run.

    Why it's wrong here

    Environment variables are set on the cluster and are not designed for per-run parameter overrides from the Jobs UI. Changing them requires cluster edits or restarts, which is impractical for manual runs and does not integrate with the scheduled trigger. This approach does not provide a clean per-run parameter mechanism and would not default dynamically on schedule.

  • ✓

    Define a job parameter with a default value and pass it to the notebook task, then override it when starting a manual run.

    Why this is correct

    Job parameters can be defined with default values and referenced by tasks, and a manual run can override them at submission time. The notebook reads the parameter through the widget API, so the same notebook works for both scheduled and manual runs. This satisfies the requirement to supply a specific date manually while defaulting to the current day on schedule.

About these practice questions

This Databricks-DE-Assoc question is part of Courseiva's 276-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-DE-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Assoc exam.