Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 114 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 114

Single answer

You are configuring a webhook to notify a monitoring system whenever a Databricks machine learning experiment completes. Which code block will correctly trigger the webhook after the experiment run finishes?

  1. A

    response = requests.post(webhook_url, json={'status': 'completed', 'experiment_id': experiment_id})

  2. B

    response = requests.put(webhook_url, data={'status': 'completed', 'experiment_id': experiment_id})

  3. C

    response = requests.get(webhook_url, params={'status': 'completed', 'experiment_id': experiment_id})

  4. D

    response = requests.delete(webhook_url, json={'status': 'completed', 'experiment_id': experiment_id})

Show answer and explanation

Correct answer: A

Explanation

Webhooks are typically triggered using a POST request that sends a payload in JSON format. This ensures the webhook endpoint receives the necessary data in a structured way to process the notification. The correct option follows this pattern.

  • A. Correct.

    This option correctly uses a POST request with a JSON payload to trigger the webhook, which is the standard method for notifying webhooks.

  • B. Incorrect.

    This option incorrectly uses a PUT request, which is typically used for updating resources, not for triggering webhooks.

  • C. Incorrect.

    This option incorrectly uses a GET request, which is used for retrieving data, not for triggering webhooks.

  • D. Incorrect.

    This option incorrectly uses a DELETE request, which is used for removing resources, not for triggering webhooks.

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