
Answer-first summary for fast verification
Answer: Specify the full file path (using the `LOCATION` clause) along with the `USING DELTA` clause when creating the table.
To create an **external (unmanaged)** table, you must explicitly provide a storage path (e.g., S3, ADLS, or GCS URI) via the `LOCATION` clause in SQL or the `.option("path", ...)` method in the DataFrame API. * **Why B is correct:** When a location is provided, Databricks creates an external table where metadata is tracked in the metastore, but the data files remain in the specified external path. If the table is dropped, only the metadata is deleted, leaving the data files intact. * **Why A is incorrect:** There is no `UNMANAGED` keyword in Spark SQL; the `EXTERNAL` keyword or the use of `LOCATION` defines this behavior. * **Why C is incorrect:** Setting a `LOCATION` at the database level only changes the default storage path for *managed* tables; it does not force tables to be external. * **Why D is incorrect:** Mounting storage makes referencing paths easier but does not automatically convert tables from managed to external.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A data architect has established a policy requiring all tables in the Lakehouse to be configured as external (unmanaged) Delta Lake tables. Which of the following approaches ensures compliance with this requirement?
A
Include the UNMANAGED keyword in the CREATE TABLE statement.
B
Specify the full file path (using the LOCATION clause) along with the USING DELTA clause when creating the table.
C
Use the LOCATION keyword when creating a database to define the default storage path.
D
Ensure that external cloud object storage is mounted when configuring the workspace environment.
No comments yet.