-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ntd_id: revise dim organiztions and enrich ntd endpoints #3710
base: main
Are you sure you want to change the base?
ntd_id: revise dim organiztions and enrich ntd endpoints #3710
Conversation
b65ec76
to
e95607a
Compare
current_dim_organizations AS ( | ||
SELECT | ||
ntd_id, | ||
caltrans_district |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is still extracting the Caltrans district from dim_organizations which extracts it form a deprecated column in Airtable. We should probably remove Caltrans District from the dim_organizations table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, thanks for letting me know @evansiroky! I was hoping to use this to enrich the new NTD mart tables with caltrans_district on ntd_id, is there a different source of truth for caltrans_district that we could use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2dbbd0e
to
45c946e
Compare
…tion rows prior to cutover date
45c946e
to
7348187
Compare
…ttern, remove deprecated airtable caltrans district columns from stg/int tables
Description
This PR seeks to replace the deprecated use of
_deprecated__ntd_agency_to_organization
indim_organizations
with the appropriate alternative, as well as enrich ntd mart tables with caltrans_district from the refactoreddim_organizations
, and perform some other cleanup tasks as outlined below:Refactor mart.dim_organizations:
_deprecated__ntd_agency_to_organization
ntd_agency_info_key
fromint_transit_database__organizations_dim
forntd_id
previously inherited from_deprecated__ntd_agency_to_organization
Enrich NTD mart tables with caltrans_district:
Data type handling in stg_transit_database__organizations:
Rename column in stg_ntd__major_safety_events / fct_major_safety_events:
Fix incorrectly named CTEs, add explicit column names (dbt best practice):
ntd
andntd_ridership
directoriesResolves: #3709
Type of change
How has this been tested?
poetry run dbt run -s +mart.ntd_ridership +mart.ntd_annual_reporting +mart.ntd_safety_and_security +mart.funding_and_expenses +mart.transit_database

Post-merge follow-ups