Week 144 - Dynamic Tables & Streams
This week’s challenge comes with a twist:
Your task is to create an hourly snapshot table of a dynamic table—but with one major constraint: You cannot use a basic SELECT statement anywhere in your solution.
Use the start-up code below to start your challenge:
Start-up code
CREATE TABLE table1 (id INT,name STRING);
INSERT INTO table1 VALUES (1, 'dummy');
CREATE OR REPLACE DYNAMIC TABLE dynamic_table
TARGET_LAG = '1 minute'
WAREHOUSE = MY_WH
AS
SELECT *
FROM table1;
Your solution should create a regular table, every hour, with the contents of the dynamic table.
Good luck!
Remember if you want to participate:
- Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to REGISTER (note joining our mailing list does not give you a Frosty Friday account).
- Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here.
- Post the URL in the comments of the challenge.