Databricks Data Engineer Professional · Section 1 · 23% of the exam
Create Lakeflow Jobs that use control-flow operators such as If/Else conditions and For Each loops.
One of the objectives of the Databricks Certified Data Engineer Professional exam, in the section “Developing Code for Data Processing using Python and SQL”. Here is what it covers, the points to remember and a question to try.
What it covers
Create, run and automate the same Lakeflow Job from the UI, the Jobs REST API 2.2, the Databricks CLI, the Python SDK and bundles, choose the right trigger, and build control flow with If/else condition tasks, For each loops, task values and run-if rules.
Points to remember
- Jobs API 2.2:
create,update(replaces sent top-level fields, merges tasks by key),reset(replace everything),run-now(saved job),runs/submit(one-time run, not saved, no retries). - CLI:
databricks jobs create --json @job.json;run-now <JOB_ID>waits up to 20 minutes by default;--no-waitreturns immediately. - UI path: Jobs & Pipelines > Create > Job; Switch to code version (YAML) shows the job as code; bundles are the recommended production path.
- Triggers: cron
schedule,periodic,file_arrival,table_update(ANY_UPDATED/ALL_UPDATED),continuous;max_concurrent_runsdefaults to 1 and queueing is on by default. - run-now accepts
job_parameters,only(with+for upstream/downstream),idempotency_token,performance_target,pipeline_params.
Try a question
A job has a schedule, email notifications and five tasks. A deployment script must add a sixth task without changing anything else. Which call is appropriate?
- A
jobs/updatewithnew_settingscontaining atasksarray with the new task - B
jobs/resetwithnew_settingsthat contains only the definition of the sixth task - C
jobs/runs/submitwith the sixth task and the job's name - D
jobs/createwith the same job name, which merges into the existing job
Show the answer
A. jobs/update replaces only the top-level fields you send, and arrays such as tasks are merged by task_key, so existing tasks, the schedule and notifications stay. jobs/reset replaces every setting with the new definition.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Lakeflow Jobs: UI, REST API, CLI and Control Flow teaches this objective (about 50 minutes), and 13 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Implement scalable Python project structures for Declarative Automation Bundles (formerly Databricks Asset Bundles / DABs) to support modular development and CI/CD integration.
- Apply troubleshooting techniques to dependency conflicts and installation failures for external libraries (PyPI, local wheels, source archives) across serverless, pipeline, and bundle-deployed environments.
- Develop User-Defined Functions (UDFs) using Pandas, Python, and SQL, including Unity Catalog functions for the given constraints.
- Create production-ready data pipelines for streaming data using Lakeflow Pipelines and Auto Loader.
- Create and automate ETL workloads using Lakeflow Jobs via the UI, API, and CLI.
- Choose between a streaming table and a materialized view for a given latency, cost, and refresh requirement.
- Implement CDC pipelines using AUTO CDC APIs (formerly APPLY CHANGES) in Lakeflow Pipelines, including SCD Type 1 and Type 2 via stored_as_scd_type.
- Choose between Spark Structured Streaming and Apache Spark™ Declarative Pipelines for scalable ETL given operational constraints.
- Choose appropriate compute and configuration for environments and dependencies — including serverless compute (serverless environments, dependency management, performance mode), high-memory notebook tasks, and auto-optimization settings (e.g., disallowing retries).
- Develop unit and integration tests using assertDataFrameEqual, assertSchemaEqual, DataFrame.transform, and testing frameworks to ensure code correctness.
- Apply Structured Streaming stateful-processing semantics, including watermarks, output modes, foreachBatch, and checkpoints for fault-tolerant exactly-once state recovery.