Nifi init

This commit is contained in:
2026-05-17 16:54:29 +02:00
parent 6203332841
commit 9cc58c20f4
15 changed files with 161 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
-- Generates one row per calendar date covering the full EWC 2025 event window.
-- Run on MySQL source DB.
WITH RECURSIVE dates AS (
SELECT DATE('2025-07-08') AS d
UNION ALL
SELECT DATE_ADD(d, INTERVAL 1 DAY) FROM dates WHERE d < '2025-08-24'
)
SELECT
CAST(DATE_FORMAT(d, '%Y%m%d') AS UNSIGNED) AS date_key,
d AS full_date,
YEAR(d) AS year,
QUARTER(d) AS quarter,
MONTH(d) AS month,
MONTHNAME(d) AS month_name,
WEEK(d, 1) AS week_number,
DAYOFMONTH(d) AS day_of_month,
DAYNAME(d) AS day_name
FROM dates;