
Answer-first summary for fast verification
Answer: CREATE TABLE .. AS SELECT * FROM hive_metastore..;
To upgrade a table to Unity Catalog as a managed table, the correct approach involves creating a new Unity Catalog table by querying the existing table. The correct SQL command for this operation is `CREATE TABLE .. AS SELECT * FROM hive_metastore..;`. This command creates a new table in the Unity Catalog with the data from the existing table in the Hive metastore. After creating the new table, it's important to manage privileges, update queries and workloads to use the new table, and test for dependencies before dropping the old table. This ensures a smooth transition to the Unity Catalog managed table.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A data engineer is tasked with upgrading a table to a Unity Catalog managed table. Which of the following queries should the data engineer use to accomplish this task?
A
MIGRATE TABLE TO .. AS SELECT * FROM hive_metastore..;
B
CREATE TABLE .. AS SELECT * FROM hive_metastore..;
C
ALTER TABLE hive_metastore.. AS ..;
D
UPGRADE TABLE TO .. AS SELECT * FROM hive_metastore..;
E
CREATE TABLE .. AS SELECT * FROM .;
No comments yet.