Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:33 AM
This "feature" in the Community edition is based on the fact that I cannot restart a cluster. So, in the morning I create a cluster for studies purposes and in the afternoon I have to recreate the cluster.
If there's any dependent objects from previous labs I have to rerun the Notebooks and recreate them, but before I do it I have to drop all files and directories (tables) I had previously created.
Here's a tip if anyone needs:
1. List the Database directory (usually it will be dbfs:/user/hive/datawarehouse/)
%sql
DESCRIBE DATABASE default
2. Get the files Location from the previous output and list the files
f = dbutils.fs.ls('dbfs:/user/hive/warehouse')
display(f)
3. Remove the files and directories so that you'll be able to rerun your Notebook to recreate the dependent tables to continue your labs.
%fs rm -r dbfs:/user/hive/warehouse/<replace_with_a_file_or_directory>/
Now you're good to go on recreating the tables and views.