DP-203 · Question #250
While working on the project, you realize that the delta table is not correct. One of your friends suggests deleting the whole directory of the table and creating a new table on the same path. Would…
The correct answer is B. No. Deleting the whole directory of a Delta table and creating a new table on the same path is not a recommended solution as: A directory may consist of very large files and deleting the directory can consume days or even hours. Therefore, it is not an efficient solution. All the…
Question
While working on the project, you realize that the delta table is not correct. One of your friends suggests deleting the whole directory of the table and creating a new table on the same path. Would you follow the suggested solution?
Options
- AYes
- BNo
How the community answered
(31 responses)- A26% (8)
- B74% (23)
Explanation
Deleting the whole directory of a Delta table and creating a new table on the same path is not a recommended solution as: A directory may consist of very large files and deleting the directory can consume days or even hours. Therefore, it is not an efficient solution. All the content of the deleted files is lost and if by mistake you delete a wrong file, it is very hard Deleting the directory is not atomic. While table deletion is in progress, a concurrent query reading the table can view a partial table or even fail. https://docs.microsoft.com/en-us/azure/databricks/delta/best-practices
Topics
Community Discussion
No community discussion yet for this question.