feat: migrate transform to 3-layer architecture with per-layer schemas

Remove raw/ layer — staging models now read landing JSON directly.
Rename all model schemas from padelnomics.* to staging.*/foundation.*/serving.*.
Web app queries updated to serving.planner_defaults via SERVING_DUCKDB_PATH.
Supervisor gets daily sleep interval between pipeline runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-22 19:04:40 +01:00
parent 53e9bbd66b
commit 2db66efe77
19 changed files with 306 additions and 301 deletions

View File

@@ -7,7 +7,7 @@
-- 20% data confidence (completeness of both population + venue data)
MODEL (
name padelnomics.city_market_profile,
name serving.city_market_profile,
kind FULL,
cron '@daily',
grain city_slug
@@ -35,7 +35,7 @@ WITH base AS (
WHEN c.population > 0 OR c.padel_venue_count > 0 THEN 0.5
ELSE 0.0
END AS data_confidence
FROM padelnomics.dim_cities c
FROM foundation.dim_cities c
WHERE c.padel_venue_count > 0
),
scored AS (

View File

@@ -8,7 +8,7 @@
-- Units are explicit in column names (EUR, %, h). All monetary values in EUR.
MODEL (
name padelnomics.planner_defaults,
name serving.planner_defaults,
kind FULL,
cron '@daily',
grain city_slug
@@ -43,7 +43,7 @@ city_venue_density AS (
population,
venues_per_100k,
market_score
FROM padelnomics.city_market_profile
FROM serving.city_market_profile
)
SELECT
cvd.city_slug,