Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 12:05 AM
What you can do is for example just add a WHERE condition in CTAS like:
CREATE TABLE ...
AS
SELECT *
FROM
...
WHERE 1 = 0Since no records meet the condition, only the table structure is created.
Also, this is a simplistic solution that should be considered as a base for your script.
In real-world you may want to add liquid clustering, so your list with mapping would include another field with clustering columns and the script would be modified to include liquid clustering if needed etc.