Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.3.1
-
None
-
None
Description
Create Database.
CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] db_name [COMMENT comment_text] [*LOCATION*path] [WITH DBPROPERTIES (key1=val1, key2=val2, ...)] {{LOCATION }}If the specified path does not already exist in the underlying file system, this command tries to create a directory with the path. *When the database is dropped later, this directory is not deleted, but currently it is deleting the directory as well.
please refer the below link
[databricks documentation|
https://docs.databricks.com/spark/latest/spark-sql/language-manual/create-database.html
]
if i create the database as below
create database db1 location '/user/hive/warehouse'; //this is hive warehouse directory
on dropping this db it will also delete the warehouse directory which contains the other db information.