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

@@ -4,7 +4,7 @@
-- Proximity dedup uses haversine approximation: 1 degree lat ≈ 111 km.
MODEL (
name padelnomics.dim_venues,
name foundation.dim_venues,
kind FULL,
cron '@daily',
grain venue_id
@@ -22,7 +22,7 @@ WITH all_venues AS (
postcode,
NULL AS tenant_type,
extracted_date
FROM padelnomics.stg_padel_courts
FROM staging.stg_padel_courts
WHERE country_code IS NOT NULL
UNION ALL
@@ -38,7 +38,7 @@ WITH all_venues AS (
postcode,
tenant_type,
extracted_date
FROM padelnomics.stg_playtomic_venues
FROM staging.stg_playtomic_venues
WHERE country_code IS NOT NULL
),
-- Rank venues so Playtomic records win ties in proximity dedup