- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 01:27 AM
Hi team, I am still fairly new to working with delta tables. I have created a df by reading in data from existing silver tables in my lakehouse. I read in the silver tables usiung sql into a workbook, do some manipulation, unnest some fiels and then attempt to load as gold dlt tables. One of my gold tables works and the other two fail with the error 'cannot create ... because managed table already exists'. Any tips, tricks, advice on how to handle this. My dlt load looks like this:
<@dlt.table(comment='gold_users processed from silver platform users table to create gold tables ready for aggregation.'
)
def gold_users():
return users_df/>
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 04:27 AM
Hi @Pravin Chaubey thanks for responding. I discovered the issue. I had to load them as unmanaged tables but had previously not specified a path when doing .saveAsTable() and so those two tables that were failing to load were in fact managed tables as you said.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 03:40 AM
Hi ,
It seems like there is already a managed table with same name.
If you want to anyhow write you need to remove first exist table with same name or if your schema is same you can append data to table.
To remove existing table you can use dbutils.fs.rm('path',True)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 04:27 AM
Hi @Pravin Chaubey thanks for responding. I discovered the issue. I had to load them as unmanaged tables but had previously not specified a path when doing .saveAsTable() and so those two tables that were failing to load were in fact managed tables as you said.

