Certified Data Engineer Professional Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Professional Exam - Question 59


A Delta Lake table was created with the below query:

Realizing that the original query had a typographical error, the below code was executed:

ALTER TABLE prod.sales_by_stor RENAME TO prod.sales_by_store

Which result will occur after running the second command?

Show Answer
Correct Answer: A

When you execute the command to rename a Delta Lake table, the table reference in the metastore is updated to reflect the new name. This operation does not involve moving or altering the data files themselves, and thus no actual data is changed. The metadata remains intact and consistent. The purpose of this command is purely administrative, to correct or update the table name in the metastore.

Discussion

3 comments
Sign in to comment
adenisOption: A
Jan 30, 2024

A is Correct

Tamele001Option: B
Mar 6, 2024

B is the correct answer. When you alter a table name in Delta Lake, the change is logged in the transaction log that Delta Lake uses to maintain a versioned history of all changes to the table. This is how Delta Lake maintains ACID properties and ensures a consistent view of the data. The transaction log is key to supporting features like time travel, auditing, and rollbacks in Delta Lake. The metadata and the actual data remain intact, and the reference to the table in the metastore is updated to reflect the new name.

hal2401meOption: A
Mar 6, 2024

did a test. No data is changed. dir & filename not changed. the rename is not recorded in transition log neither.