cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Regarding Database location in dbfs

Pavan3
New Contributor II

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.

2 REPLIES 2

filipniziol
Contributor

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:

filipniziol_0-1727883188470.png

Hope it helps

Pavan3
New Contributor II

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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group