
Answer-first summary for fast verification
Answer: `dbfs:/user/hive/warehouse`
In Databricks, when you create a database using the `CREATE DATABASE` command without specifying a location, it defaults to the Hive metastore warehouse directory. The default location is `dbfs:/user/hive/warehouse/database_name`. However, the question asks for the location where the database will be located, and the correct answer is `dbfs:/user/hive/warehouse` because this is the root directory where all databases are stored by default in the Hive metastore. The database itself would be created as a subdirectory under this location. **Key Points:** - The Hive metastore in Databricks uses `dbfs:/user/hive/warehouse` as the default warehouse directory - Each database created without a specified location becomes a subdirectory under this warehouse directory - The complete path for the `customer360` database would be `dbfs:/user/hive/warehouse/customer360.db` - Option B is correct because it identifies the root warehouse directory where the database will be stored
Author: Keng Suppaseth
Ultimate access to all questions.
A data engineer has created a new database using the following command:
CREATE DATABASE IF NOT EXISTS customer360;
CREATE DATABASE IF NOT EXISTS customer360;
In which location will the customer360 database be located?
A
dbfs:/user/hive/database/customer360
B
dbfs:/user/hive/warehouse
C
dbfs:/user/hive/customer360
D
dbfs:/user/hive/database
No comments yet.