This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This procedure will take the full path of a Snowflake table (Database, Schema and Table name) and will deduplicate it using a rotation mechanism. | |
To minimize waste we first check if the count of the rows of the table is the same as the unique. | |
If not, given a table A, we create a deduplicated version A_DEDUP. | |
Table A is renamed to A_ROTATE | |
A_DEDUP is renamed to A |