
Ultimate access to all questions.
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?
A
dbfs:/user/hive/database/customer360
B
dbfs:/user/hive/warehouse
C
dbfs:/user/hive/customer360
D
More information is needed to determine the correct response
E
dbfs:/user/hive/database
Explanation:
In Databricks, when you create a database using the CREATE DATABASE command without specifying a custom location, the database is created in the default Hive warehouse directory. The default location for Hive databases in Databricks is:
dbfs:/user/hive/warehouse/
When you create a database without specifying a location, Databricks creates a subdirectory with the database name inside this warehouse directory. So for the customer360 database, the actual directory would be:
dbfs:/user/hive/warehouse/customer360.db
However, among the given options, option B (dbfs:/user/hive/warehouse) is the correct answer because it represents the default warehouse location where databases are stored.
dbfs:/user/hive/warehouse/.db extensionCREATE DATABASE customer360 LOCATION 'dbfs:/mnt/data/customer360';
CREATE DATABASE customer360 LOCATION 'dbfs:/mnt/data/customer360';
/user/hive/This understanding is important for Databricks data engineers to know where their data is stored and how to manage database locations effectively.