164k views
0 votes
What type of table is created when you create delta table with below command?

CREATE TABLE transactions USING DELTA LOCATION ""DBFS:/mnt/bronze/transactions
a. Managed delta table
b. External table
c. Managed table
d. Temp table
e. Delta Lake table"

User Allzhere
by
7.7k points

2 Answers

6 votes

Final Answer:

The type of table created with the given command `CREATE TABLE transactions USING DELTA LOCATION "DBFS:/mnt/bronze/transactions"` is a Managed delta table.

Step-by-step explanation:

The command specifies the creation of a table named "transactions" using the Delta format. When using `USING DELTA`, it indicates the creation of a Delta table, which is a type of table managed by Delta Lake. A Managed delta table implies that Delta Lake manages both the metadata and data of the table. The `LOCATION` clause specifies the location where the table's data files will be stored, indicating that it will be stored in the specified directory path, "DBFS:/mnt/bronze/transactions."

A Managed delta table refers to a table where Delta Lake manages the underlying files and metadata. This includes handling data versioning, transactions, and metadata information for the table. Managed tables in Delta Lake provide various capabilities such as ACID (Atomicity, Consistency, Isolation, Durability) transactions, schema enforcement, time travel, and more, making them highly reliable and suitable for data lake environments.

The distinction between a Managed delta table and an External table lies in the management of data and metadata. In a Managed table, Delta Lake manages both the metadata and the underlying data files, while in an External table, the table metadata is managed by Delta Lake, but the data files are stored externally and managed by an external system or tool, allowing access to data without the system taking control over the underlying files.

User Maaz Patel
by
9.0k points
5 votes

Final Answer:

The type of table created with the given command is a. Managed delta table.Thus correct otpion is a. Managed delta table

Step-by-step explanation:

Delta Lake is a storage layer that brings ACID transactions to Apache Spark and big data workloads. When you create a table using the Delta format and specify a location for its storage, the resultant table is a managed delta table. This means that Delta Lake manages the metadata and data of this table, allowing for transactional capabilities, schema enforcement, and metadata management. In the context of the provided command, the USING DELTA clause specifies the table format as Delta, and the LOCATION parameter points to the directory where Delta Lake stores the table data.

Managed delta tables are controlled by Delta Lake and they maintain transactional information and metadata within the specified location, enabling features like time travel, schema evolution, and more. They are different from external tables which reference data that is external to the Delta Lake directory and are not managed by Delta Lake itself. In this case, the command specifies a location within the Delta Lake, indicating that the table being created will be managed by Delta Lake, hence making it a managed delta table.

The USING DELTA statement in the command explicitly tells Spark to create a Delta table. The LOCATION clause specifies the path in the DBFS where the Delta table's files are stored. This table is a managed delta table as it will have its metadata managed by Delta Lake, allowing for greater control, integrity, and functionalities that Delta Lake provides, such as ACID transactions, schema evolution, and time travel queries.

User Jack James
by
8.5k points