
Answer-first summary for fast verification
Answer: INSERT OVERWRITE TABLE orders_archive SELECT * FROM orders;
The correct command to synchronize the latest changes from the 'orders' table to the 'orders_archive' clone is `INSERT OVERWRITE orders_archive SELECT * FROM orders`. This command replaces all existing data in 'orders_archive' with the current data from 'orders', effectively syncing the clone with the original table's latest state. - **Why not A?** The `REFRESH` command updates table metadata, not the data itself, and `SYNC` is not a recognized command in Delta Lake. - **Why not B?** `CREATE OR REPLACE TABLE orders_archive DEEP CLONE orders` would recreate the clone, not sync existing changes. - **Why not C?** Similar to B, dropping and recreating the clone does not sync changes but replaces the clone entirely. Thus, the most effective method is `INSERT OVERWRITE orders_archive SELECT * FROM orders`.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A data engineer is working with a Delta Lake table named ‘orders_archive’, which was created using the command CREATE TABLE orders_archive DEEP CLONE orders. The engineer needs to synchronize the latest changes from the original 'orders' table to this clone. Which command should be used to accomplish this task?
A
REFRESH orders_archive; SYNC orders_archive INSERT OVERWRITE orders_archive
B
CREATE OR REPLACE TABLE orders_archive DEEP CLONE orders;
C
DROP TABLE orders_archive; CREATE TABLE orders_archive DEEP CLONE orders
D
INSERT OVERWRITE TABLE orders_archive SELECT * FROM orders;
No comments yet.