
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 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 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:
dbfs:/user/hive/warehouse/, but this can be configured differently.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:
CREATE DATABASE command doesn't specify a locationWhy other options are incorrect:
dbfs:/user/hive/database/customer360 - This is not a standard Databricks pathdbfs:/user/hive/warehouse - This is the default for Hive metastore, but not guaranteed without more informationdbfs:/user/hive/customer360 - This is not a standard Databricks pathdbfs:/user/hive/database - This is not a standard Databricks pathTo create a database at a specific location, you should use:
CREATE DATABASE IF NOT EXISTS customer360
LOCATION 'dbfs:/mnt/data/customer360';
CREATE DATABASE IF NOT EXISTS customer360
LOCATION 'dbfs:/mnt/data/customer360';