From 8ff38d0edf14915fd6c1ee5c29a52f53e02cbebb Mon Sep 17 00:00:00 2001 From: Laurie Merrell Date: Thu, 11 May 2023 10:15:39 -0500 Subject: [PATCH] non-working wip; need to go refactor service alerts --- .../int_gtfs_rt__service_alerts_trip_day_map_grouping.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/warehouse/models/intermediate/gtfs/int_gtfs_rt__service_alerts_trip_day_map_grouping.sql b/warehouse/models/intermediate/gtfs/int_gtfs_rt__service_alerts_trip_day_map_grouping.sql index aaef3a510e..0f87d12cc0 100644 --- a/warehouse/models/intermediate/gtfs/int_gtfs_rt__service_alerts_trip_day_map_grouping.sql +++ b/warehouse/models/intermediate/gtfs/int_gtfs_rt__service_alerts_trip_day_map_grouping.sql @@ -56,6 +56,11 @@ int_gtfs_rt__service_alerts_trip_day_map_grouping AS ( trip_start_date, trip_schedule_relationship, schedule_feeds.feed_timezone, + ARRAY_AGG(DISTINCT + TO_JSON_STRING( + STRUCT + (cause, effect, header_text_text, description_text_text) + )) AS alert_content_array, ARRAY_AGG(DISTINCT id) AS message_ids_array, ARRAY_AGG(DISTINCT header_timestamp) AS header_timestamps_array, ARRAY_AGG(DISTINCT service_alert_message_key) AS message_keys_array,