Options
- 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' expectingIt looks like cloning is only available in Databricks yet. If not the case, how should I setup spark to have it working.
Thanks
Labels:
- Labels:
-
Shallow Clone