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:ย 

Not able to create table shallow clone on DBR 15.0

cszczotka
New Contributor III

Hi,

I'm getting below error when I'm trying to create table shallow clone on my DBR 15.0.

[CANNOT_SHALLOW_CLONE_NON_UC_MANAGED_TABLE_AS_SOURCE_OR_TARGET] Shallow clone is only supported for the MANAGED table type. The table xxx_clone is not MANAGED table. SQLSTATE: 0AKUC

In documentation  https://learn.microsoft.com/en-us/azure/databricks/delta/clone-unity-catalog is:

"Shallow clone support for Unity Catalog external table is in Public Preview in Databricks Runtime 14.2 and above."

Is something require to enable this feature on my DBR/Unit Catalog ?

Thanks,
Czeslaw

 

 

3 REPLIES 3

shan_chandra
Esteemed Contributor

@cszczotka - you can perform shallow clone from an UC external table to an external table (or) from an UC managed table to a managed table. If we try to perform shallow clone from an UC external to a managed table or vice versa. The error is thrown. 

cszczotka
New Contributor III

Hi,

Source table is external table in UC and  result table should be also external. I'm running such command 

CREATE TABLE target_catalog.target_schema.table_clone SHALLOW CLONE source_catalog.source_schema.source_table
 
but this for some reason doesn't work on my databricks.

 

cszczotka
New Contributor III

Hi,

It works if is specified location for table clone:

CREATE TABLE target_catalog.target_schema.table_clone SHALLOW CLONE source_catalog.source_schema.source_table LOCATION 

'abfss://.../table_clone'
 
After running this command I'm able to see table in UC with Type EXTERNAL_SHALLOW_CLONE.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group