TRANSACTION support for RENAME
Since MERGE statement is not supported, we are using CTAS for preparing the new table and using the rename operation.
Currently we do not have the TRANSACTION support for the RENAME operations.
When we have two rename operations we may run into inconsistent state if second statement fails.
RENAME OBJECT FinalTable TO FinalTableOld;
RENAME OBJECT FinalTableStage TO FinalTable;
To overcome this, we need some workaround or support for transactions.
Thanks for your suggestion. We are looking into this scenario for a future release. 10697293
Ralph Kemperdick commented
Absolutely agree to Rajeev's comment!!!
Is there any plan to prioritize this capability?
Very much needed - CTAS is currently being suggested as a workaround for many scenarios, and they end with renaming the new table as the old one. This operation should absolutely be transactional and since it's a metadata operation, it should work reliably across all distributions.