Certified Data Engineer Associate Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Associate Exam - Question 64


A data engineer has created a new database using the following command:

CREATE DATABASE IF NOT EXISTS customer360;

In which of the following locations will the customer360 database be located?

Show Answer
Correct Answer: BD

When creating a database in Databricks using the CREATE DATABASE IF NOT EXISTS command, without specifying a LOCATION, the database is usually created in the default location under the warehouse directory. This is typically the dbfs:/user/hive/warehouse directory, which is where Hive Metastore entries are stored by default. Therefore, the customer360 database would be located at dbfs:/user/hive/warehouse.

Discussion

13 comments
Sign in to comment
kbaba101Option: B
Oct 21, 2023

B B. dbfs:/user/hive/warehouse Thereby showing "dbfs:/user/hive/warehouse/customer360.db

kishanuOption: B
Oct 20, 2023

dbfs:/user/hive/warehouse - which is the default location of any object created

SD5713Option: B
Oct 24, 2023

dbfs:/user/hive/warehouse - which is the default location

jskibickOption: D
May 19, 2024

D is correct. We do not know if this is a Unity Catalog enabled database. If so it would be created in default location of catalog as managed table. Therefore too little info to answer.

meow_akkOption: A
Oct 22, 2023

Ans A : https://community.databricks.com/t5/data-engineering/database-within-a-database-in-databricks/td-p/20731#:~:text=The%20default%20location%20of%20a,and%20Table%20location%20are%20independent. The default location of a database will be in the /user/hive/warehouse/<databasename. db>. Irrespective of the location of the database the tables in the database can have different locations and they can be specified at the time of creation. Database location and Table location are independent.

SD5713
Oct 24, 2023

dbfs:/user/hive/warehouse - which is the default location

anandpsg101Option: B
Oct 25, 2023

b is correct

HuroyeOption: B
Nov 15, 2023

correct answer is B. dbfs:/user/hive/warehouse. All managed objects are stored in the default location unless specified.

kz_dataOption: B
Dec 6, 2023

B is correct

GarynOption: B
Dec 30, 2023

B. dbfs:/user/hive/warehouse Explanation: In Databricks, the default location for databases created in the Hive Metastore is often under the warehouse directory. The CREATE DATABASE command usually creates the metadata entry for the database in the Hive Metastore, but it doesn’t directly create the physical database directory within DBFS (Databricks File System). The exact path structure may differ based on configuration or settings in the Databricks environment, but generally, the warehouse directory is where Hive databases' metadata resides. The physical data within the database will be stored in DBFS, but the metadata for the customer360 database should be within the warehouse directory in Hive Metastore.

UGOTCOOKIESOption: B
Jan 26, 2024

Creating tables without using the LOCATION keyword to specify a location will create the table (a managed table) in the default directory which is: dbfs:/user/hive/warehouse https://docs.databricks.com/en/dbfs/root-locations.html

Bob123456Option: B
Feb 25, 2024

While usage schema and database is interchangeable, schema is preferred. Option B is correct

benni_aleOption: B
Apr 29, 2024

B is correct

aspix82Option: B
May 23, 2024

B. B is "default"