
Answer-first summary for fast verification
Answer: databricks workspace import --source /LocalPath/Notebook.py --target /WorkspacePath/Notebook.py
The correct command format to import a notebook into a Databricks workspace using the Databricks CLI is `databricks workspace import --source /LocalPath/Notebook.py --target /WorkspacePath/Notebook.py`. This command is preferred because: 1. It uses the `databricks workspace import` syntax, which is the correct command for importing notebooks. 2. The `--source` flag specifies the notebook's location on your local machine. 3. The `--target` flag specifies where the notebook should be placed in the Databricks workspace. This format is clear, structured, and follows standard conventions for the Databricks CLI.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Which command correctly imports a notebook into a Databricks workspace using the Databricks CLI?
A
databricks fs import /LocalPath/Notebook.py /WorkspacePath/Notebook.py
B
databricks workspace import --source /LocalPath/Notebook.py --target /WorkspacePath/Notebook.py
C
databricks import --workspace /LocalPath/Notebook.py /WorkspacePath/Notebook.py
D
databricks workspace import /LocalPath/Notebook.py /WorkspacePath/Notebook.py
No comments yet.