amogh-jahagirdar commented on issue #6619:
URL: https://github.com/apache/iceberg/issues/6619#issuecomment-1405811455

   > Is there something with a metadata pointer or something if this occurs?
   
   Yes, so Athena's integration with Iceberg uses the Glue Catalog. Every write 
done by Athena on the Iceberg table (in this case your inserts) is 
optimistically writing out the metadata file and then updating the 
metadata_location property on the Glue table as part of the commit. 
   
   When you drop an Iceberg table in Athena as you observed, we do delete the 
S3 files and drop the glue table (meaning now the pointer to the metadata 
location is lost). When you re-create the table after restoring the backup, a 
new glue table is created with a new metadata pointer (effectively an empty 
table state). 
   
   So after re-creating the table and restoring your data what you can do is 
update the metadata_location table property in Glue to point to the latest 
metadata location prior to dropping the table. After that you should be able to 
read the data as before. I was able to repro this process in my account, but 
please let me know if you run into any issues! 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to