cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Converting managed table to external tables

Roger667
New Contributor

I have some managed tables in catalog which i plan to convert to external tables. But i want preserve the version history of the tables as well. I have tried deep cloning but it builds the external table as version 0. Is there any way i can achieve this?

1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

Hello @Roger667,

When you use the DEEP CLONE command, you can specify the version of the table you want to clone. This allows you to create a clone of the table at a specific version, thus preserving the version history up to that point. Here is an example of how to do this:

CREATE TABLE new_external_table DEEP CLONE managed_table VERSION AS OF <version_number> LOCATION 'path_to_external_location';