fix: DuckDB compat issues in Playtomic pipeline + export_serving
- Add maximum_object_size=128MB to read_json for 14K-venue tenants file - Rewrite opening_hours to use UNION ALL unpivot (DuckDB struct dynamic access) - Add seed file guard for availability model (empty result on first run) - Fix snapshot_date VARCHAR→DATE comparison in venue_pricing_benchmarks - Fix export_serving to resolve SQLMesh physical tables from view definitions (SQLMesh views reference "local" catalog unavailable outside its context) - Add pyarrow dependency for Arrow-based cross-connection data transfer Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ WITH venue_stats AS (
|
||||
MAX(da.active_court_count) AS court_count,
|
||||
COUNT(DISTINCT da.snapshot_date) AS days_observed
|
||||
FROM foundation.fct_daily_availability da
|
||||
WHERE da.snapshot_date >= CURRENT_DATE - INTERVAL '30 days'
|
||||
WHERE TRY_CAST(da.snapshot_date AS DATE) >= CURRENT_DATE - INTERVAL '30 days'
|
||||
AND da.occupancy_rate IS NOT NULL
|
||||
AND da.occupancy_rate BETWEEN 0 AND 1.5
|
||||
GROUP BY da.tenant_id, da.country_code, da.city, da.price_currency
|
||||
|
||||
Reference in New Issue
Block a user