- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 07:39 AM
Hello,
I use delta on my local machine and I would like to clone a table, however the cloning is not working.
I have the last version of delta installed (delta-spark==2.0.0) but the clone method does not exist in the python module.
With this code :
delta_table.clone(clone_table_name, isShallow=True, replace=True)
I have the following error :
AttributeError: 'DeltaTable' object has no attribute 'clone'
When I try this way :
spark.sql("""CREATE OR REPLACE TABLE db_2.table_name
SHALLOW CLONE db_1.table_name""")
I have the following error
mismatched input 'SHALLOW' expecting
It looks like cloning is only available in Databricks yet. If not the case, how should I setup spark to have it working.
Thanks
- Labels:
-
Clone
-
Delta
-
Shallow Clone
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2022 04:06 PM
Hi @Bertrand BURCKER,
Delta clone is not available in OSS yet. Right now you can only use this feature in Databricks.
You can find more details and when it will be available in this Jira https://github.com/delta-io/delta/issues/920
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 12:15 AM
It is not available in OSS delta AFAIK.
I also think it is still in public preview on Databricks, so maybe it gets added?
Anyhow, the only way to get it working is to use databricks. You can use dbx from databricks-labs if you want to develop locally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2022 04:06 PM
Hi @Bertrand BURCKER,
Delta clone is not available in OSS yet. Right now you can only use this feature in Databricks.
You can find more details and when it will be available in this Jira https://github.com/delta-io/delta/issues/920
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2022 06:21 AM
Hello @Bertrand BURCKER
Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.
We'd love to hear from you.
Thanks!

