From d524c45926609ecd75013518220b941e777a5641 Mon Sep 17 00:00:00 2001 From: Charles Costanzo Date: Thu, 19 Sep 2024 16:58:34 -0400 Subject: [PATCH] initial dbt yml for stg and src, as well as initial staging tables for 2022 nts data --- .../ntd_annual_data_tables/2022/_src.yml | 42 +++++++++++++++++++ .../2022/_stg_ntd_annual_data_tables.yml | 37 ++++++++++++++++ .../stg_ntd_annual_data__2022__breakdowns.sql | 11 +++++ ...nnual_data__2022__breakdowns_by_agency.sql | 11 +++++ ..._2022__capital_expenses_by_capital_use.sql | 11 +++++ ...l_data__2022__capital_expenses_by_mode.sql | 11 +++++ ..._capital_expenses_for_existing_service.sql | 11 +++++ ...ital_expenses_for_expansion_of_service.sql | 11 +++++ ...annual_data__2022__employees_by_agency.sql | 11 +++++ ...d_annual_data__2022__employees_by_mode.sql | 11 +++++ ...2__employees_by_mode_and_employee_type.sql | 11 +++++ ...ntd_annual_data__2022__fuel_and_energy.sql | 11 +++++ ..._data__2022__fuel_and_energy_by_agency.sql | 11 +++++ ..._2022__funding_sources_by_expense_type.sql | 11 +++++ ...22__funding_sources_directly_generated.sql | 11 +++++ ...al_data__2022__funding_sources_federal.sql | 11 +++++ ...nual_data__2022__funding_sources_local.sql | 11 +++++ ...nual_data__2022__funding_sources_state.sql | 11 +++++ ...funding_sources_taxes_levied_by_agency.sql | 11 +++++ ...ual_data__2022__maintenance_facilities.sql | 11 +++++ ...2022__maintenance_facilities_by_agency.sql | 11 +++++ .../stg_ntd_annual_data__2022__metrics.sql | 11 +++++ ...__2022__operating_expenses_by_function.sql | 11 +++++ ...rating_expenses_by_function_and_agency.sql | 11 +++++ ...data__2022__operating_expenses_by_type.sql | 11 +++++ ..._operating_expenses_by_type_and_agency.sql | 11 +++++ ...d_annual_data__2022__service_by_agency.sql | 11 +++++ ...ntd_annual_data__2022__service_by_mode.sql | 11 +++++ ..._2022__service_by_mode_and_time_period.sql | 11 +++++ ...facilities_by_agency_and_facility_type.sql | 11 +++++ ...l_data__2022__stations_by_mode_and_age.sql | 11 +++++ ...ata__2022__track_and_roadway_by_agency.sql | 11 +++++ ..._data__2022__track_and_roadway_by_mode.sql | 11 +++++ ..._and_roadway_guideway_age_distribution.sql | 11 +++++ ..._data__2022__vehicles_age_distribution.sql | 11 +++++ ...a__2022__vehicles_type_count_by_agency.sql | 11 +++++ 36 files changed, 453 insertions(+) create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/_src.yml create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/_stg_ntd_annual_data_tables.yml create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_capital_use.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_mode.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_existing_service.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_expansion_of_service.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode_and_employee_type.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_by_expense_type.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_directly_generated.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_federal.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_local.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_state.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_taxes_levied_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__metrics.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function_and_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type_and_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode_and_time_period.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_and_facilities_by_agency_and_facility_type.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_by_mode_and_age.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_agency.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_mode.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_guideway_age_distribution.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_age_distribution.sql create mode 100644 warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_type_count_by_agency.sql diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/_src.yml b/warehouse/models/staging/ntd_annual_data_tables/2022/_src.yml new file mode 100644 index 0000000000..d6dbcd3d7a --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/_src.yml @@ -0,0 +1,42 @@ +version: 2 + +sources: + - name: external_ntd__annual_reporting + description: Annual data tables for the year 2022, loaded from DOT NTD API https://www.transit.dot.gov/ntd/ntd-data. + database: "{{ env_var('DBT_SOURCE_DATABASE', var('SOURCE_DATABASE')) }}" + schema: external_ntd__annual_reporting + tables: + - name: 2022__stations_and_facilities_by_agency_and_facility_type + - name: 2022__stations_by_mode_and_age + - name: 2022__operating_expenses_by_function + - name: 2022__operating_expenses_by_function_and_agency + - name: 2022__operating_expenses_by_type + - name: 2022__operating_expenses_by_type_and_agency + - name: 2022__vehicles_age_distribution + - name: 2022__vehicles_type_count_by_agency + - name: 2022__service_by_mode_and_time_period + - name: 2022__service_by_mode + - name: 2022__service_by_agency + - name: 2022__track_and_roadway_by_mode + - name: 2022__track_and_roadway_guideway_age_distribution + - name: 2022__track_and_roadway_by_agency + - name: 2022__metrics + - name: 2022__funding_sources_by_expense_type + - name: 2022__funding_sources_directly_generated + - name: 2022__funding_sources_taxes_levied_by_agency + - name: 2022__funding_sources_local + - name: 2022__funding_sources_state + - name: 2022__funding_sources_federal + - name: 2022__maintenance_facilities + - name: 2022__maintenance_facilities_by_agency + - name: 2022__fuel_and_energy + - name: 2022__fuel_and_energy_by_agency + - name: 2022__employees_by_mode_and_employee_type + - name: 2022__employees_by_mode + - name: 2022__employees_by_agency + - name: 2022__capital_expenses_by_capital_use + - name: 2022__capital_expenses_by_mode + - name: 2022__capital_expenses_for_existing_service + - name: 2022__capital_expenses_for_expansion_of_service + - name: 2022__breakdowns + - name: 2022__breakdowns_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/_stg_ntd_annual_data_tables.yml b/warehouse/models/staging/ntd_annual_data_tables/2022/_stg_ntd_annual_data_tables.yml new file mode 100644 index 0000000000..d2fe657e7d --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/_stg_ntd_annual_data_tables.yml @@ -0,0 +1,37 @@ +version: 2 + +models: + - name: stg_ntd_annual_data__2022__stations_and_facilities_by_agency_and_facility_type + - name: stg_ntd_annual_data__2022__stations_by_mode_and_age + - name: stg_ntd_annual_data__2022__operating_expenses_by_function + - name: stg_ntd_annual_data__2022__operating_expenses_by_function_and_agency + - name: stg_ntd_annual_data__2022__operating_expenses_by_type + - name: stg_ntd_annual_data__2022__operating_expenses_by_type_and_agency + - name: stg_ntd_annual_data__2022__vehicles_age_distribution + - name: stg_ntd_annual_data__2022__vehicles_type_count_by_agency + - name: stg_ntd_annual_data__2022__service_by_mode_and_time_period + - name: stg_ntd_annual_data__2022__service_by_mode + - name: stg_ntd_annual_data__2022__service_by_agency + - name: stg_ntd_annual_data__2022__track_and_roadway_by_mode + - name: stg_ntd_annual_data__2022__track_and_roadway_guideway_age_distribution + - name: stg_ntd_annual_data__2022__track_and_roadway_by_agency + - name: stg_ntd_annual_data__2022__metrics + - name: stg_ntd_annual_data__2022__funding_sources_by_expense_type + - name: stg_ntd_annual_data__2022__funding_sources_directly_generated + - name: stg_ntd_annual_data__2022__funding_sources_taxes_levied_by_agency + - name: stg_ntd_annual_data__2022__funding_sources_local + - name: stg_ntd_annual_data__2022__funding_sources_state + - name: stg_ntd_annual_data__2022__funding_sources_federal + - name: stg_ntd_annual_data__2022__maintenance_facilities + - name: stg_ntd_annual_data__2022__maintenance_facilities_by_agency + - name: stg_ntd_annual_data__2022__fuel_and_energy + - name: stg_ntd_annual_data__2022__fuel_and_energy_by_agency + - name: stg_ntd_annual_data__2022__employees_by_mode_and_employee_type + - name: stg_ntd_annual_data__2022__employees_by_mode + - name: stg_ntd_annual_data__2022__employees_by_agency + - name: stg_ntd_annual_data__2022__capital_expenses_by_capital_use + - name: stg_ntd_annual_data__2022__capital_expenses_by_mode + - name: stg_ntd_annual_data__2022__capital_expenses_for_existing_service + - name: stg_ntd_annual_data__2022__capital_expenses_for_expansion_of_service + - name: stg_ntd_annual_data__2022__breakdowns + - name: stg_ntd_annual_data__2022__breakdowns_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns.sql new file mode 100644 index 0000000000..1a4b9d7675 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns.sql @@ -0,0 +1,11 @@ +WITH external_2022_breakdowns AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__breakdowns') }} +), + +stg_ntd_annual_data_tables__2022__breakdowns AS ( + SELECT * + FROM external_2022_breakdowns +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__breakdowns diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns_by_agency.sql new file mode 100644 index 0000000000..f64e32ce01 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__breakdowns_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_breakdowns_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__breakdowns_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__breakdowns_by_agency AS ( + SELECT * + FROM external_2022_breakdowns_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__breakdowns_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_capital_use.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_capital_use.sql new file mode 100644 index 0000000000..da07363ed2 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_capital_use.sql @@ -0,0 +1,11 @@ +WITH external_2022_capital_expenses_by_capital_use AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__capital_expenses_by_capital_use') }} +), + +stg_ntd_annual_data_tables__2022__capital_expenses_by_capital_use AS ( + SELECT * + FROM external_2022_capital_expenses_by_capital_use +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__capital_expenses_by_capital_use diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_mode.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_mode.sql new file mode 100644 index 0000000000..a8c8560cc1 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_by_mode.sql @@ -0,0 +1,11 @@ +WITH external_2022_capital_expenses_by_mode AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__capital_expenses_by_mode') }} +), + +stg_ntd_annual_data_tables__2022__capital_expenses_by_mode AS ( + SELECT * + FROM external_2022_capital_expenses_by_mode +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__capital_expenses_by_mode diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_existing_service.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_existing_service.sql new file mode 100644 index 0000000000..0132ea83cf --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_existing_service.sql @@ -0,0 +1,11 @@ +WITH external_2022_capital_expenses_for_existing_service AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__capital_expenses_for_existing_service') }} +), + +stg_ntd_annual_data_tables__2022__capital_expenses_for_existing_service AS ( + SELECT * + FROM external_2022_capital_expenses_for_existing_service +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__capital_expenses_for_existing_service diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_expansion_of_service.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_expansion_of_service.sql new file mode 100644 index 0000000000..7a9722829f --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__capital_expenses_for_expansion_of_service.sql @@ -0,0 +1,11 @@ +WITH external_2022_capital_expenses_for_expansion_of_service AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__capital_expenses_for_expansion_of_service') }} +), + +stg_ntd_annual_data_tables__2022__capital_expenses_for_expansion_of_service AS ( + SELECT * + FROM external_2022_capital_expenses_for_expansion_of_service +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__capital_expenses_for_expansion_of_service diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_agency.sql new file mode 100644 index 0000000000..4949c6a12e --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_employees_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__employees_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__employees_by_agency AS ( + SELECT * + FROM external_2022_employees_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__employees_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode.sql new file mode 100644 index 0000000000..5562ae9b67 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode.sql @@ -0,0 +1,11 @@ +WITH external_2022_employees_by_mode AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__employees_by_mode') }} +), + +stg_ntd_annual_data_tables__2022__employees_by_mode AS ( + SELECT * + FROM external_2022_employees_by_mode +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__employees_by_mode diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode_and_employee_type.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode_and_employee_type.sql new file mode 100644 index 0000000000..69161fe98a --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__employees_by_mode_and_employee_type.sql @@ -0,0 +1,11 @@ +WITH external_2022_employees_by_mode_and_employee_type AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__employees_by_mode_and_employee_type') }} +), + +stg_ntd_annual_data_tables__2022__employees_by_mode_and_employee_type AS ( + SELECT * + FROM external_2022_employees_by_mode_and_employee_type +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__employees_by_mode_and_employee_type diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy.sql new file mode 100644 index 0000000000..4181061ccd --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy.sql @@ -0,0 +1,11 @@ +WITH external_2022_fuel_and_energy AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__fuel_and_energy') }} +), + +stg_ntd_annual_data_tables__2022__fuel_and_energy AS ( + SELECT * + FROM external_2022_fuel_and_energy +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__fuel_and_energy diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy_by_agency.sql new file mode 100644 index 0000000000..77859a1d33 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__fuel_and_energy_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_fuel_and_energy_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__fuel_and_energy_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__fuel_and_energy_by_agency AS ( + SELECT * + FROM external_2022_fuel_and_energy_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__fuel_and_energy_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_by_expense_type.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_by_expense_type.sql new file mode 100644 index 0000000000..001b489b20 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_by_expense_type.sql @@ -0,0 +1,11 @@ +WITH external_2022_funding_sources_by_expense_type AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__funding_sources_by_expense_type') }} +), + +stg_ntd_annual_data_tables__2022__funding_sources_by_expense_type AS ( + SELECT * + FROM external_2022_funding_sources_by_expense_type +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__funding_sources_by_expense_type diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_directly_generated.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_directly_generated.sql new file mode 100644 index 0000000000..73de0a1de6 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_directly_generated.sql @@ -0,0 +1,11 @@ +WITH external_2022_funding_sources_directly_generated AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__funding_sources_directly_generated') }} +), + +stg_ntd_annual_data_tables__2022__funding_sources_directly_generated AS ( + SELECT * + FROM external_2022_funding_sources_directly_generated +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__funding_sources_directly_generated diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_federal.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_federal.sql new file mode 100644 index 0000000000..5ef40f50bc --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_federal.sql @@ -0,0 +1,11 @@ +WITH external_2022_funding_sources_federal AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__funding_sources_federal') }} +), + +stg_ntd_annual_data_tables__2022__funding_sources_federal AS ( + SELECT * + FROM external_2022_funding_sources_federal +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__funding_sources_federal diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_local.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_local.sql new file mode 100644 index 0000000000..768db8b52c --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_local.sql @@ -0,0 +1,11 @@ +WITH external_2022_funding_sources_local AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__funding_sources_local') }} +), + +stg_ntd_annual_data_tables__2022__funding_sources_local AS ( + SELECT * + FROM external_2022_funding_sources_local +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__funding_sources_local diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_state.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_state.sql new file mode 100644 index 0000000000..735039dc13 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_state.sql @@ -0,0 +1,11 @@ +WITH external_2022_funding_sources_state AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__funding_sources_state') }} +), + +stg_ntd_annual_data_tables__2022__funding_sources_state AS ( + SELECT * + FROM external_2022_funding_sources_state +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__funding_sources_state diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_taxes_levied_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_taxes_levied_by_agency.sql new file mode 100644 index 0000000000..5a55f84ef7 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__funding_sources_taxes_levied_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_funding_sources_taxes_levied_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__funding_sources_taxes_levied_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__funding_sources_taxes_levied_by_agency AS ( + SELECT * + FROM external_2022_funding_sources_taxes_levied_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__funding_sources_taxes_levied_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities.sql new file mode 100644 index 0000000000..9c437faf76 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities.sql @@ -0,0 +1,11 @@ +WITH external_2022_maintenance_facilities AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__maintenance_facilities') }} +), + +stg_ntd_annual_data_tables__2022__maintenance_facilities AS ( + SELECT * + FROM external_2022_maintenance_facilities +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__maintenance_facilities diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities_by_agency.sql new file mode 100644 index 0000000000..c713b2aaa4 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__maintenance_facilities_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_maintenance_facilities_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__maintenance_facilities_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__maintenance_facilities_by_agency AS ( + SELECT * + FROM external_2022_maintenance_facilities_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__maintenance_facilities_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__metrics.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__metrics.sql new file mode 100644 index 0000000000..023b0bac8a --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__metrics.sql @@ -0,0 +1,11 @@ +WITH external_2022_metrics AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__metrics') }} +), + +stg_ntd_annual_data_tables__2022__metrics AS ( + SELECT * + FROM external_2022_metrics +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__metrics diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function.sql new file mode 100644 index 0000000000..4ba6d83354 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function.sql @@ -0,0 +1,11 @@ +WITH external_2022_operating_expenses_by_function AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__operating_expenses_by_function') }} +), + +stg_ntd_annual_data_tables__2022__operating_expenses_by_function AS ( + SELECT * + FROM external_2022_operating_expenses_by_function +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__operating_expenses_by_function diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function_and_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function_and_agency.sql new file mode 100644 index 0000000000..0c123dc31a --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_function_and_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_operating_expenses_by_function_and_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__operating_expenses_by_function_and_agency') }} +), + +stg_ntd_annual_data_tables__2022__operating_expenses_by_function_and_agency AS ( + SELECT * + FROM external_2022_operating_expenses_by_function_and_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__operating_expenses_by_function_and_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type.sql new file mode 100644 index 0000000000..478082deb9 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type.sql @@ -0,0 +1,11 @@ +WITH external_2022_operating_expenses_by_type AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__operating_expenses_by_type') }} +), + +stg_ntd_annual_data_tables__2022__operating_expenses_by_type AS ( + SELECT * + FROM external_2022_operating_expenses_by_type +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__operating_expenses_by_type diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type_and_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type_and_agency.sql new file mode 100644 index 0000000000..af012796c0 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__operating_expenses_by_type_and_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_operating_expenses_by_type_and_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__operating_expenses_by_type_and_agency') }} +), + +stg_ntd_annual_data_tables__2022__operating_expenses_by_type_and_agency AS ( + SELECT * + FROM external_2022_operating_expenses_by_type_and_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__operating_expenses_by_type_and_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_agency.sql new file mode 100644 index 0000000000..492ffd0ab1 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_service_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__service_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__service_by_agency AS ( + SELECT * + FROM external_2022_service_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__service_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode.sql new file mode 100644 index 0000000000..66482ae265 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode.sql @@ -0,0 +1,11 @@ +WITH external_2022_service_by_mode AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__service_by_mode') }} +), + +stg_ntd_annual_data_tables__2022__service_by_mode AS ( + SELECT * + FROM external_2022_service_by_mode +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__service_by_mode diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode_and_time_period.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode_and_time_period.sql new file mode 100644 index 0000000000..bb9f3b4797 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__service_by_mode_and_time_period.sql @@ -0,0 +1,11 @@ +WITH external_2022_service_by_mode_and_time_period AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__service_by_mode_and_time_period') }} +), + +stg_ntd_annual_data_tables__2022__service_by_mode_and_time_period AS ( + SELECT * + FROM external_2022_service_by_mode_and_time_period +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__service_by_mode_and_time_period diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_and_facilities_by_agency_and_facility_type.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_and_facilities_by_agency_and_facility_type.sql new file mode 100644 index 0000000000..58ca496a4e --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_and_facilities_by_agency_and_facility_type.sql @@ -0,0 +1,11 @@ +WITH external_2022_stations_and_facilities_by_agency_and_facility_type AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__stations_and_facilities_by_agency_and_facility_type') }} +), + +stg_ntd_annual_data_tables__2022__stations_and_facilities_by_agency_and_facility_type AS ( + SELECT * + FROM external_2022_stations_and_facilities_by_agency_and_facility_type +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__stations_and_facilities_by_agency_and_facility_type diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_by_mode_and_age.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_by_mode_and_age.sql new file mode 100644 index 0000000000..884585c4a5 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__stations_by_mode_and_age.sql @@ -0,0 +1,11 @@ +WITH external_2022_stations_by_mode_and_age AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__stations_by_mode_and_age') }} +), + +stg_ntd_annual_data_tables__2022__stations_by_mode_and_age AS ( + SELECT * + FROM external_2022_stations_by_mode_and_age +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__stations_by_mode_and_age diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_agency.sql new file mode 100644 index 0000000000..39e49212b5 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_track_and_roadway_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__track_and_roadway_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__track_and_roadway_by_agency AS ( + SELECT * + FROM external_2022_track_and_roadway_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__track_and_roadway_by_agency diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_mode.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_mode.sql new file mode 100644 index 0000000000..44a3097de4 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_by_mode.sql @@ -0,0 +1,11 @@ +WITH external_2022_track_and_roadway_by_mode AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__track_and_roadway_by_mode') }} +), + +stg_ntd_annual_data_tables__2022__track_and_roadway_by_mode AS ( + SELECT * + FROM external_2022_track_and_roadway_by_mode +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__track_and_roadway_by_mode diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_guideway_age_distribution.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_guideway_age_distribution.sql new file mode 100644 index 0000000000..e72fddd498 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__track_and_roadway_guideway_age_distribution.sql @@ -0,0 +1,11 @@ +WITH external_2022_track_and_roadway_guideway_age_distribution AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__track_and_roadway_guideway_age_distribution') }} +), + +stg_ntd_annual_data_tables__2022__track_and_roadway_guideway_age_distribution AS ( + SELECT * + FROM external_2022_track_and_roadway_guideway_age_distribution +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__track_and_roadway_guideway_age_distribution diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_age_distribution.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_age_distribution.sql new file mode 100644 index 0000000000..471af580c9 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_age_distribution.sql @@ -0,0 +1,11 @@ +WITH external_2022_vehicles_age_distribution AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__vehicles_age_distribution') }} +), + +stg_ntd_annual_data_tables__2022__vehicles_age_distribution AS ( + SELECT * + FROM external_2022_vehicles_age_distribution +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__vehicles_age_distribution diff --git a/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_type_count_by_agency.sql b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_type_count_by_agency.sql new file mode 100644 index 0000000000..90189535c2 --- /dev/null +++ b/warehouse/models/staging/ntd_annual_data_tables/2022/stg_ntd_annual_data__2022__vehicles_type_count_by_agency.sql @@ -0,0 +1,11 @@ +WITH external_2022_vehicles_type_count_by_agency AS ( + SELECT * + FROM {{ source('external_ntd__annual_reporting', '2022__vehicles_type_count_by_agency') }} +), + +stg_ntd_annual_data_tables__2022__vehicles_type_count_by_agency AS ( + SELECT * + FROM external_2022_vehicles_type_count_by_agency +) + +SELECT * FROM stg_ntd_annual_data_tables__2022__vehicles_type_count_by_agency