Regarding Database location in dbfs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 06:00 AM
Hi,
I have used "SET spark.sql.warehouse.dir" which creates the directory by default.Then I have created the database by command "CREATE DATABASE IF NOT EXISTS database_name;",but when I used "DESCRIBE DATABASE database_name" I could not find the location of database created.Even I tried using "%fs ls dbfs:/",I could not find the directory of database.
Please let me know If anyone knows the solution to find the location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 08:34 AM
Hi @Pavan3 ,
If running DESCRIBE DATABASE the location is empty, then was created in the default CATALOG directory.
What you can do is to create any table in that database and run DESCRIBE DETAIL on that table:
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2024 12:14 PM
Hi filipniziol,
Thanks for your reply.
I can see the database in Catalog.But, I want to see that the database is created in the location "dbfs:/user/hive/warehouse" folder which was created by default using "SET spark.sql.warehouse.dir " command.
Thank you,
Pavan.

