Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 112 of 280

Databricks Certified Machine Learning Professional. Professional level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Professional Question 112

Single answer

You are setting up a webhook in Databricks to monitor the completion of a machine learning model training job. The webhook should be triggered only when the job run is successful. Which of the following code blocks will correctly trigger the shown webhook?

  1. A

    dbutils.notebook.exit('SUCCESS')

  2. B

    dbutils.jobs.taskValues.set('status', 'SUCCESS')

  3. C

    dbutils.jobs.runNow(job_id, 'status=SUCCESS')

  4. D

    dbutils.notebook.exit(json.dumps({'status': 'SUCCESS'}))

Show answer and explanation

Correct answer: D

Explanation

To trigger a webhook in Databricks, the correct payload must be sent that matches the condition configured in the webhook. In this scenario, the webhook is configured to listen for a 'SUCCESS' status. The correct code block is the one that sends the appropriate JSON payload (option 4). Other options either do not provide the correct payload format or do not include the condition required to trigger the webhook.

  • A. Incorrect.

    This option does not send the required payload for triggering the webhook with the specific condition 'SUCCESS'. It only exits the notebook with a 'SUCCESS' string, which is not sufficient for webhook triggering.

  • B. Incorrect.

    This option sets a task value with the key 'status' and value 'SUCCESS', but it does not send the correct payload to the webhook.

  • C. Incorrect.

    This option triggers another Databricks job with a 'status=SUCCESS' parameter, but it does not meet the requirements for triggering the webhook in the described scenario.

  • D. Correct.

    This option correctly sends a JSON payload containing the key-value pair {'status': 'SUCCESS'}, which aligns with the condition required to trigger the webhook. The webhook can evaluate this payload and act accordingly.

Timed practice exam

Take a Databricks Machine Learning Professional practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam