feat: add basic redpanda rising wave setup

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-08-05 21:41:30 +02:00
commit f8ef7701ea
17 changed files with 3043 additions and 0 deletions

13
templates/create_mvs.sql Normal file
View File

@@ -0,0 +1,13 @@
-- The number of clicks on the ad within one minute after the ad was shown.
create materialized view m_click_statistic as
select
count(user_id) as clicks_count,
ad_id
from
ad_source
where
click_timestamp is not null
and impression_timestamp < click_timestamp
and impression_timestamp + interval '1' minute >= click_timestamp
group by
ad_id;