cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to copy files of databricks associated storage account UC tables along with _delta_log folder

ajay_wavicle
New Contributor

I want to migrate managed tables from one cloud Databricks workspace to another as it is with delta history. I am able to do with External tables since i have access to storage account container folder but its not the case for UC managed tables. How do i solve this to copy files from one storage account to another

3 REPLIES 3

szymon_dybczak
Esteemed Contributor III

Hi @ajay_wavicle ,

I think you can try with DEEP CLONE. deep clone is a clone that copies the source table data to the clone target in addition to the metadata of the existing table

Clone a table on Databricks | Databricks on AWS

lucami
Contributor

Hi @szymon_dybczak,

I suggest you the following:

  1. Create storage credential
  2. Register an external location for new storage location
  3. Create the catalog with a managed location
  4. Migrate table with full Delta history using DEEP CLONE


-- Azure example
CREATE EXTERNAL LOCATION extloc_target
  URL 'abfss://<container>@<account>.dfs.core.windows.net/<prefix>'
  WITH STORAGE CREDENTIAL cred_mi
  COMMENT 'Target path for managed catalog';


CREATE CATALOG my_catalog
  MANAGED LOCATION 'abfss://<container>@<account>.dfs.core.windows.net/<prefix>';

 

CREATE TABLE my_catalog.core.my_table
DEEP CLONE src_catalog.core.my_table;

@lucami @szymon_dybczak I tried deep clone as mentioned above but when i describe history on the new cloned table i get only 1 row in desc history. How do i Make it same as before.