Skip to content

Commit

Permalink
remove dupe name column in gtfs_utils_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanychu90 committed Jun 7, 2024
1 parent bbb1d57 commit 4f23318
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _shared_utils/shared_utils/gtfs_utils_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit 4f23318

Please sign in to comment.