Skip to content
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: add explicit column names to ntd annual reporting and safety/security tables #3588

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

charlie-costanzo
Copy link
Member

Description

We recently brought in NTD tables as MVPs and we're going back and adding explicit column names to the following schema directories:

  • staging/ntd_annual_reporting
  • mart/ntd_annual_reporting
  • staging/ntd_safety_and_security
  • mart/ntd_safety_and_security

We also slightly modified the name of this external table:

  • 2023__annual_database_contractual_relationships

Type of change

  • New feature

How has this been tested?

Include commands/logs/screenshots as relevant.
locally using dbt, all tables ran except for one as expected because this PR also includes a change to it's upstream source. that ran locally in airflow

Screenshot 2024-12-16 at 7 42 17 PM

Post-merge follow-ups

  • Actions required (specified below)
    observe for expected behavior in warehouse but especially in airflow external table change

@charlie-costanzo charlie-costanzo added the data-pipeline-ingestion-and-modeling Ingesting, parsing and modeling data. Evan Siroky is product owner. label Dec 17, 2024
@charlie-costanzo charlie-costanzo self-assigned this Dec 17, 2024
@charlie-costanzo charlie-costanzo marked this pull request as ready for review December 17, 2024 00:42
Copy link

Warehouse report 📦

Checks/potential follow-ups

Checks indicate the following action items may be necessary.

  • For new models, do they all have a surrogate primary key that is tested to be not-null and unique?

New models 🌱

calitp_warehouse.mart.ntd_annual_reporting.dim_2023_agency_information

calitp_warehouse.mart.ntd_annual_reporting.fct_2023_contractual_relationships

calitp_warehouse.mart.ntd_annual_reporting.fct_breakdowns

calitp_warehouse.mart.ntd_annual_reporting.fct_breakdowns_by_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_capital_expenses_by_capital_use

calitp_warehouse.mart.ntd_annual_reporting.fct_capital_expenses_by_mode

calitp_warehouse.mart.ntd_annual_reporting.fct_capital_expenses_for_existing_service

calitp_warehouse.mart.ntd_annual_reporting.fct_capital_expenses_for_expansion_of_service

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_upt

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_vrm

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__master

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__upt

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__upt_estimates

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__voms

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__vrh

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__vrm

calitp_warehouse.mart.ntd_ridership.fct_complete_monthly_ridership_with_adjustments_and_estimates__vrm_estimates

calitp_warehouse.mart.ntd_annual_reporting.fct_employees_by_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_employees_by_mode

calitp_warehouse.mart.ntd_annual_reporting.fct_employees_by_mode_and_employee_type

calitp_warehouse.mart.ntd_safety_and_security.fct_fra_regulated_mode_major_security_events

calitp_warehouse.mart.ntd_annual_reporting.fct_fuel_and_energy

calitp_warehouse.mart.ntd_annual_reporting.fct_fuel_and_energy_by_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_funding_sources_by_expense_type

calitp_warehouse.mart.ntd_annual_reporting.fct_funding_sources_directly_generated

calitp_warehouse.mart.ntd_annual_reporting.fct_funding_sources_federal

calitp_warehouse.mart.ntd_annual_reporting.fct_funding_sources_local

calitp_warehouse.mart.ntd_annual_reporting.fct_funding_sources_state

calitp_warehouse.mart.ntd_annual_reporting.fct_funding_sources_taxes_levied_by_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_maintenance_facilities

calitp_warehouse.mart.ntd_annual_reporting.fct_maintenance_facilities_by_agency

calitp_warehouse.mart.ntd_safety_and_security.fct_major_safety_events

calitp_warehouse.mart.ntd_annual_reporting.fct_metrics

calitp_warehouse.mart.ntd_safety_and_security.fct_monthly_modal_time_series_safety_and_service

calitp_warehouse.mart.ntd_safety_and_security.fct_nonmajor_safety_and_security_events

calitp_warehouse.mart.ntd_annual_reporting.fct_operating_expenses_by_function

calitp_warehouse.mart.ntd_annual_reporting.fct_operating_expenses_by_function_and_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_operating_expenses_by_type

calitp_warehouse.mart.ntd_annual_reporting.fct_operating_expenses_by_type_and_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_service_by_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_service_by_mode

calitp_warehouse.mart.ntd_annual_reporting.fct_service_by_mode_and_time_period

calitp_warehouse.mart.ntd_annual_reporting.fct_stations_and_facilities_by_agency_and_facility_type

calitp_warehouse.mart.ntd_annual_reporting.fct_stations_by_mode_and_age

calitp_warehouse.mart.ntd_annual_reporting.fct_track_and_roadway_by_agency

calitp_warehouse.mart.ntd_annual_reporting.fct_track_and_roadway_by_mode

calitp_warehouse.mart.ntd_annual_reporting.fct_track_and_roadway_guideway_age_distribution

calitp_warehouse.mart.ntd_annual_reporting.fct_vehicles_age_distribution

calitp_warehouse.mart.ntd_annual_reporting.fct_vehicles_type_count_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__2023_agency_information

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__2023_contractual_relationships

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__breakdowns

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__breakdowns_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__capital_expenses_by_capital_use

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__capital_expenses_by_mode

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__capital_expenses_for_existing_service

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__capital_expenses_for_expansion_of_service

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_upt

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_vrm

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__master

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__upt

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__upt_estimates

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__voms

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__vrh

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__vrm

calitp_warehouse.staging.ntd_ridership.stg_ntd__complete_monthly_ridership_with_adjustments_and_estimates__vrm_estimates

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__employees_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__employees_by_mode

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__employees_by_mode_and_employee_type

calitp_warehouse.staging.ntd_safety_and_security.stg_ntd__fra_regulated_mode_major_security_events

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__fuel_and_energy

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__fuel_and_energy_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__funding_sources_by_expense_type

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__funding_sources_directly_generated

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__funding_sources_federal

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__funding_sources_local

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__funding_sources_state

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__funding_sources_taxes_levied_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__maintenance_facilities

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__maintenance_facilities_by_agency

calitp_warehouse.staging.ntd_safety_and_security.stg_ntd__major_safety_events

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__metrics

calitp_warehouse.staging.ntd_safety_and_security.stg_ntd__monthly_modal_time_series_safety_and_service

calitp_warehouse.staging.ntd_safety_and_security.stg_ntd__nonmajor_safety_and_security_events

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__operating_expenses_by_function

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__operating_expenses_by_function_and_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__operating_expenses_by_type

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__operating_expenses_by_type_and_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__service_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__service_by_mode

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__service_by_mode_and_time_period

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__stations_and_facilities_by_agency_and_facility_type

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__stations_by_mode_and_age

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__track_and_roadway_by_agency

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__track_and_roadway_by_mode

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__track_and_roadway_guideway_age_distribution

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__vehicles_age_distribution

calitp_warehouse.staging.ntd_annual_reporting.stg_ntd__vehicles_type_count_by_agency

DAG

Legend (in order of precedence)

Resource type Indicator Resolution
Large table-materialized model Orange Make the model incremental
Large model without partitioning or clustering Orange Add partitioning and/or clustering
View with more than one child Yellow Materialize as a table or incremental
Incremental Light green
Table Green
View White

Copy link
Contributor

@erikamov erikamov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!
It is much better to see all column name without having to query tables!!
Great work.

@charlie-costanzo charlie-costanzo merged commit 0104335 into main Dec 17, 2024
4 checks passed
@charlie-costanzo charlie-costanzo deleted the ntd-enrich-and-filter-marts branch December 17, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-pipeline-ingestion-and-modeling Ingesting, parsing and modeling data. Evan Siroky is product owner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants