Databricks Certified Data Engineer Professional — Question 70
Which describes a method of installing a Python package scoped at the notebook level to all nodes in the currently active cluster?
Answer options
- A. Run source env/bin/activate in a notebook setup script
- B. Use b in a notebook cell
- C. Use %pip install in a notebook cell
- D. Use %sh pip install in a notebook cell
- E. Install libraries from PyPI using the cluster UI
Correct answer: C
Explanation
The correct answer is C, as using %pip install directly in a notebook cell ensures that the package is installed for the entire cluster. The other options either do not apply to the notebook level installation or are not the recommended methods for installing Python packages within this context.