Databricks Certified Data Engineer Associate · Free Practice Question Hard
Question 3
How do you upgrade an existing workspace managed table to a unity catalog table?
-
A
ALTER TABLE table_name SET UNITY_CATALOG = TRUE -
B
Create table catalog_name.schema_name.table_nameas select * from hive_metastore.old_schema.old_table -
C
Create table table_name as select * from hive_metastore.old_schema.old_table -
D
Create table table_name format = UNITY as select * from old_table_name -
E
Create or replace table_name format = UNITY using deep clone old_table_name
Reveal correct answer
Correct answer: B
Explanation
The answer is Create table catalog_name.schema_name.table_name as select * from hive_metastore.old_schema.old_table
Basically, we are moving the data from an internal hive metastore to a metastore and catalog that is registered in the Unity catalog.
note: if it is a managed table the data is copied to a different storage account, for a large tables this can take a lot of time. For an external table the process is different.
Managed table: Upgrade a managed to Unity Catalog
External table: Upgrade an external table to Unity Catalog
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
