Overview
Concepts
Cluster Architecture
Strengths
Scenarios
ALTER TABLE [db.]tbl1 REPLACE WITH TABLE tbl2[PROPERTIES('swap' = 'true')];
swap parameter is true, after replacement, the data in the tbl1 table is the original data in the tbl2 table. The data in the tbl2 table is the original data in the tbl1 table. The data of the two tables is swapped.swap parameter is false, after replacement, the data in the tbl1 table is the original data in the tbl2 table. The tbl2 table is deleted.swap is true, the operations are as follows:swap is false, the operations are as follows:swap parameter defaults to true. Replacing a table is equivalent to swapping the data of the two tables.swap parameter is false, the replaced table (Table A) will be deleted and cannot be recovered.CREATE TABLE LIKE statement to create a new table with the same structure, import the new data into the new table, and then replace the old table atomically through the replace operation to achieve the goal. For atomic overwrite operations at the partition level, refer to Temporary Partition.フィードバック