
Answer-first summary for fast verification
Answer: dbutils.fs.rm("/databricks-datasets/retail-org/sales",True)
The `rm` command is used to remove a file or a directory. To get help for this command, you can run `dbutils.fs.help("rm")`. For example, `dbutils.fs.rm("/mnt/my-folder/", True)` removes the specified directory and all its contents if `recurse` is set to `True`. Therefore, the correct command to delete the 'sales' table and its contents is `dbutils.fs.rm("/databricks-datasets/retail-org/sales",True)`.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A data engineer needs to manually delete all files and directories associated with the 'sales' table located at '/databricks-datasets/retail-org/sales'. Which command should be used for this task?
A
dbutils.fs.remove("/databricks-datasets/retail-org/sales",True)
B
dbutils.fs.delete("/databricks-datasets/retail-org/sales",True)
C
dbutils.fs.drop("/databricks-datasets/retail-org/sales",True)
D
dbutils.fs.rm("/databricks-datasets/retail-org/sales",True)
E
dbutils.fs.mv("/databricks-datasets/retail-org/sales",True)
No comments yet.