
Answer-first summary for fast verification
Answer: More information is needed to determine the correct response
## Explanation In Databricks, when you create a database using `CREATE DATABASE IF NOT EXISTS customer360;` without specifying a location, the database will be created in the default location. However, the exact default location depends on the workspace configuration and the metastore being used. Key points: 1. **Default location varies**: The default location can be different based on whether you're using the Databricks Unity Catalog metastore or the Hive metastore. 2. **Unity Catalog**: If using Unity Catalog, databases are created in the Unity Catalog metastore, not in a specific DBFS path. 3. **Hive metastore**: If using the Hive metastore, the default location is typically `dbfs:/user/hive/warehouse/`, but this can be configured differently. 4. **Location specification**: Without specifying a `LOCATION` clause in the `CREATE DATABASE` command, we cannot determine the exact path. **Correct Answer**: D (More information is needed to determine the correct response) is correct because: - We don't know which metastore is being used (Unity Catalog vs Hive metastore) - We don't know if the workspace has custom configurations - The `CREATE DATABASE` command doesn't specify a location - The default location varies based on multiple factors **Why other options are incorrect**: - **A**: `dbfs:/user/hive/database/customer360` - This is not a standard Databricks path - **B**: `dbfs:/user/hive/warehouse` - This is the default for Hive metastore, but not guaranteed without more information - **C**: `dbfs:/user/hive/customer360` - This is not a standard Databricks path - **E**: `dbfs:/user/hive/database` - This is not a standard Databricks path To create a database at a specific location, you should use: ```sql CREATE DATABASE IF NOT EXISTS customer360 LOCATION 'dbfs:/mnt/data/customer360'; ```
Author: Keng Suppaseth
Ultimate access to all questions.
No comments yet.
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 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