DATABRICKS-DATA-ENGINEER-ASSOCIATE practice question 25 of 25
Which of the following commands will return the location of database customer360?
Full set: 177 questionsThe DESCRIBE DATABASE command is used to retrieve metadata about a specified database. The output of this command includes essential information such as the database name, its comment (if any), and its location on the filesystem. The EXTENDED option can be used to retrieve additional properties. This command is the direct and standard way to query for the location of a database within Databricks SQL.
A. DESCRIBE LOCATION customer360; This is not a valid SQL command in Databricks. The DESCRIBE command requires a valid object type like DATABASE, TABLE, or FUNCTION.
B. DROP DATABASE customer360; This command is a Data Definition Language (DDL) statement used to permanently delete a database and its associated objects, not to retrieve information about it.
D. ALTER DATABASE customer360 SET DBPROPERTIES ('location' = '/user'};
This command modifies the properties of a database. It is used to set or change the location, not to query or return the current location.
E. USE DATABASE customer360; This command sets the current default database for the session. It does not return any metadata or information about the database itself. ---
1. Databricks SQL Language Reference
DESCRIBE DATABASE:
Source: Official Databricks Documentation
Content: "Returns the metadata of an existing database. The metadata information includes database name
database comment
and database location on the filesystem."
Reference: Databricks Documentation > SQL reference > Data definition language > DESCRIBE DATABASE.
2. Databricks SQL Language Reference
DROP DATABASE:
Source: Official Databricks Documentation
Content: "Drops (deletes) a database. If the database does not exist
an exception is thrown."
Reference: Databricks Documentation > SQL reference > Data definition language > DROP DATABASE.
3. Databricks SQL Language Reference
ALTER DATABASE:
Source: Official Databricks Documentation
Content: "This statement is used to alter the properties of a database. Currently
the only supported use case is to set the DBPROPERTIES of a database." (Note: SET LOCATION is also supported). This confirms it's a modification command.
Reference: Databricks Documentation > SQL reference > Data definition language > ALTER DATABASE.
4. Databricks SQL Language Reference
USE:
Source: Official Databricks Documentation
Content: "The USE statement sets the current catalog or database."
Reference: Databricks Documentation > SQL reference > Data manipulation language > USE.
Keep practicing
Take the free DATABRICKS-DATA-ENGINEER-ASSOCIATE practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DATABRICKS-DATA-ENGINEER-ASSOCIATE practice questions
- Question 1In which of the following scenarios should a data engineer use the MERGE INTO command ins…
- Question 2Which of the following data workloads will utilize a Gold table as its source?
- Question 3A data engineer has developed a data pipeline to ingest data from a JSON source using Aut…
- Question 4Which two components function in the DB platform architecture’s control plane? (Choose tw…
- Question 5Which of the following code blocks will remove the rows where the value in column age is …
- Question 7Which of the following statements regarding the relationship between Silver tables and Br…
