Databricks Machine Learning Associate exam dumps

Databricks Machine Learning Associate practice question 43 of 656

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

Databricks Machine Learning Associate Question 43

Single answer

You want to install a Python library so that it is available to all notebooks running on a Databricks cluster. Which method should you use?

  1. A

    Use the %pip install command in a notebook cell

  2. B

    Navigate to the cluster configuration page, add the library under the 'Libraries' tab, and restart the cluster

  3. C

    Create a Databricks job to install the library for all notebooks

  4. D

    Install the library in one notebook and share the notebook with other users

Show answer and explanation

Correct answer: B

Explanation

To make a Python library available to all notebooks running on a Databricks cluster, you must install it at the cluster level using the cluster configuration interface. This ensures that the library is available in the environment of all notebooks that use this cluster. Other methods, such as %pip install or installing in a single notebook, only apply to specific sessions and do not affect the cluster-wide environment.

  • A. Incorrect.

    %pip install installs the library only in the current notebook session. It does not make the library available to all notebooks in the cluster.

  • B. Correct.

    Adding the library in the cluster configuration under the 'Libraries' tab ensures the library is installed at the cluster level and is available to all notebooks running on the cluster.

  • C. Incorrect.

    Databricks jobs are used for scheduling and running computations, not for installing libraries.

  • D. Incorrect.

    Installing the library in one notebook does not make it available to other notebooks, even if the notebook is shared.

Timed practice exam

Take a Databricks Machine Learning Associate practice test under exam conditions

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

Start timed exam