Update `mart_ad_hoc.fct_scheduled_service_by_daypart` to check for last day of month
Closed this issue · 0 comments
tiffanychu90 commented
User story / feature request
_Please describe your need, outlining the key users, the feature being requested, and the goal that that the feature will facilitate. I want the monthly table showing aggregate scheduled service hours to add a row for a new month only on the last day of the month. I want to standardize how monthly tables are created and follow the pattern in fct_monthly_routes.
I do not want to grab operator X's monthly total service hours until the month has elapsed.
Ex: I want LA Metro's Jan 2024 total service hours by time-of-day for the entire month of January, not only for half the month.
Acceptance Criteria
_Please enter something that can be verified to show that this user story is satisfied.
- Add this condition in the SQL
WHERE date = LAST_DAY(date, MONTH)
, similar to howmart_gtfs.fct_monthly_routes
query is constructed. - fct_scheduled_service_by_daypart
- fct_monthly_routes