Home / DE Professional practice test / Developing Code for Data Processing using Python and SQL / Question

Databricks Data Engineer Professional · free practice question

A data engineering team needs to programmatically trigger a Databricks Job from an external orchestration system (Apache Airflow running on-premises) after an…

Exam-style question on Developing Code for Data Processing using Python and SQL from the free DE Professional practice test, with the answer and a full explanation below.

Updated November 16, 2026

Developing Code for Data Processing using Python and SQL Medium

A data engineering team needs to programmatically trigger a Databricks Job from an external orchestration system (Apache Airflow running on-premises) after an upstream data delivery is confirmed. The job has two required parameters: run_date (a date string) and env (either prod or staging). The team is using a service principal with the Can Manage Run permission on the job. Which approach correctly triggers the job run with the required parameters using the Databricks REST API?

  1. ASend a POST request to /api/2.2/jobs/runs/submit with a JSON body containing {"job_id": <id>, "python_params": ["--run_date", "2025-01-15", "--env", "prod"]}. The runs/submit endpoint is used for all programmatic job triggers, including jobs with pre-configured task graphs.
  2. BSend a POST request to /api/2.2/jobs/run-now with a JSON body containing {"job_id": <id>, "job_parameters": {"run_date": "2025-01-15", "env": "prod"}}. The run-now endpoint triggers an existing job definition with optional parameter overrides, and job_parameters passes named key-value parameters to all tasks in the job.
  3. CSend a GET request to /api/2.2/jobs/get?job_id=<id> to retrieve the job configuration, modify the parameters block of the response JSON to include the required values, then PUT the modified configuration back to /api/2.2/jobs/update before calling /api/2.2/jobs/run-now. This pattern ensures parameters are set at the job definition level before triggering.
  4. DUse the Databricks CLI command databricks jobs run-now --job-id <id> --params '{"run_date": "2025-01-15", "env": "prod"}' from the Airflow BashOperator. The CLI is the recommended integration method for external orchestration systems because it handles authentication token refresh automatically, unlike direct REST API calls which require manual token management.
  5. ESend a POST request to /api/2.0/jobs/run-now with a JSON body containing {"job_id": <id>, "notebook_params": {"run_date": "2025-01-15", "env": "prod"}}. The notebook_params field is the correct parameter-passing mechanism for all job types, including multi-task jobs with Python and SQL tasks.
Answer & explanation

Correct answer: B

WHY B: /api/2.2/jobs/run-now is the correct endpoint for triggering an existing pre-configured job. The job_parameters field passes named key-value pairs that are accessible to all tasks in the job as job-level parameters, replacing the older task-type-specific param fields. This is the modern, recommended approach for parameterized job runs. WHY NOT A: /api/2.2/jobs/runs/submit is for submitting a one-off run with a fully self-contained run spec (including cluster config and task definitions). It is not used to trigger an existing job by ID with parameter overrides. WHY NOT C: Modifying the job definition before each run is an anti-pattern that risks concurrent modification conflicts, pollutes job version history, and requires additional API calls. Parameters should be passed at run time, not written to the job definition. WHY NOT D: While the Databricks CLI can trigger jobs, it does not provide automatic token refresh beyond what the configured credential profile supports. The --params flag syntax described is also not the correct CLI parameter format for job parameters. WHY NOT E: /api/2.0/jobs/run-now is a legacy API version (two versions behind the current 2.2). notebook_params only passes parameters to Notebook tasks, not to Python, SQL, or DLT tasks in a multi-task job. job_parameters in the current API 2.2 is the correct multi-task-aware field.

Take the full DE Professional practice test free →

Would you pass today?

This question is one of 60 in the free, timed Databricks Data Engineer Professional practice test. Take it and get a section-by-section score.

Start the free test →