From 6a3110406e4be96483cfe31b10c0d70bec0bfe0c Mon Sep 17 00:00:00 2001 From: tiffanychu90 Date: Fri, 7 Jun 2024 18:40:06 +0000 Subject: [PATCH] remove dupe name column in gtfs_utils_v2 --- _shared_utils/shared_utils/gtfs_utils_v2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_shared_utils/shared_utils/gtfs_utils_v2.py b/_shared_utils/shared_utils/gtfs_utils_v2.py index 187389d61..3e08d5701 100644 --- a/_shared_utils/shared_utils/gtfs_utils_v2.py +++ b/_shared_utils/shared_utils/gtfs_utils_v2.py @@ -252,14 +252,14 @@ def schedule_daily_feed_to_gtfs_dataset_name( # Get GTFS schedule datasets from Airtable dim_gtfs_datasets = schedule_rt_utils.filter_dim_gtfs_datasets( keep_cols=["key", "name", "type", "regional_feed_type"], custom_filtering={"type": ["schedule"]}, get_df=False - ) >> rename(name="gtfs_dataset_name") + ) # Merge on gtfs_dataset_key to get organization name fact_feeds = ( tbls.mart_gtfs.fct_daily_schedule_feeds() >> filter(_.date == selected_date) - >> inner_join(_, dim_gtfs_datasets, on="gtfs_dataset_key") - ) + >> inner_join(_, dim_gtfs_datasets, on=["gtfs_dataset_key", "gtfs_dataset_name"]) + ) >> rename(name="gtfs_dataset_name") if get_df: fact_feeds = (