Reputation: 31
I want to clone the shell of a Snowflake database (metadata only, no data). Is this possible? I have checked the documentation and haven't found a solution.
Upvotes: 3
Views: 2036
Reputation: 33
Reached here looking for an answer to a similar question. This is the alternative that i used: CREATE TABLE TRGT_DB.TRGT_SCH.MY_TABLE AS SELECT * FROM SRC_DB.SRC_SCH.MY_TABLE WHERE 1=2;
Upvotes: 0
Reputation: 7339
If you're just trying to get an empty shell of an existing database, you could clone the entire database, and then script out a truncate of all of the tables that exist in the database. The clone doesn't add any data, and the truncate would be very quick on the clone (while not affecting the original tables).
Upvotes: 3