Skip to content

Commit

Permalink
Merge pull request #3470 from cal-itp/3403-ntd-api-external-tables
Browse files Browse the repository at this point in the history
NTD external tables for Complete Monthly Ridership with Adjustments and Estimates Data
  • Loading branch information
erikamov authored Sep 23, 2024
2 parents dae006d + a9b9c65 commit 8bbbde0
Show file tree
Hide file tree
Showing 10 changed files with 2,615 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
operator: operators.ExternalTable
bucket: gs://calitp-ntd-xlsx-products-clean
prefix_bucket: false
post_hook: |
SELECT *
FROM `{{ get_project_id() }}`.external_ntd__ridership.historical__complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_upt
LIMIT 1;
source_objects:
- "complete_monthly_ridership_with_adjustments_and_estimates/historical/calendar_year_upt/*.jsonl.gz"
destination_project_dataset_table: "external_ntd__ridership.historical__complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_upt"
source_format: NEWLINE_DELIMITED_JSON
use_bq_client: true
hive_options:
mode: AUTO
require_partition_filter: false
source_uri_prefix: "complete_monthly_ridership_with_adjustments_and_estimates/historical/calendar_year_upt/"
schema_fields:
- name: ntd_id
type: NUMERIC
- name: legacy_ntd_id
type: STRING
- name: agency
type: STRING
- name: mode_type_of_service_status
type: STRING
- name: reporter_type
type: STRING
- name: uace_cd
type: NUMERIC
- name: uza_name
type: STRING
- name: mode
type: STRING
- name: tos
type: STRING
- name: _3_mode
type: STRING
- name: _2002
type: FLOAT
- name: _2003
type: FLOAT
- name: _2004
type: FLOAT
- name: _2005
type: FLOAT
- name: _2006
type: FLOAT
- name: _2007
type: FLOAT
- name: _2008
type: FLOAT
- name: _2009
type: FLOAT
- name: _2010
type: FLOAT
- name: _2011
type: FLOAT
- name: _2012
type: FLOAT
- name: _2013
type: FLOAT
- name: _2014
type: FLOAT
- name: _2015
type: FLOAT
- name: _2016
type: FLOAT
- name: _2017
type: FLOAT
- name: _2018
type: FLOAT
- name: _2019
type: FLOAT
- name: _2020
type: FLOAT
- name: _2021
type: FLOAT
- name: _2022
type: FLOAT
- name: _2023
type: FLOAT
- name: _2024
type: FLOAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
operator: operators.ExternalTable
bucket: gs://calitp-ntd-xlsx-products-clean
prefix_bucket: false
post_hook: |
SELECT *
FROM `{{ get_project_id() }}`.external_ntd__ridership.historical__complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_vrm
LIMIT 1;
source_objects:
- "complete_monthly_ridership_with_adjustments_and_estimates/historical/calendar_year_vrm/*.jsonl.gz"
destination_project_dataset_table: "external_ntd__ridership.historical__complete_monthly_ridership_with_adjustments_and_estimates__calendar_year_vrm"
source_format: NEWLINE_DELIMITED_JSON
use_bq_client: true
hive_options:
mode: AUTO
require_partition_filter: false
source_uri_prefix: "complete_monthly_ridership_with_adjustments_and_estimates/historical/calendar_year_vrm/"
schema_fields:
- name: ntd_id
type: NUMERIC
- name: legacy_ntd_id
type: STRING
- name: agency
type: STRING
- name: mode_type_of_service_status
type: STRING
- name: reporter_type
type: STRING
- name: uace_cd
type: NUMERIC
- name: uza_name
type: STRING
- name: mode
type: STRING
- name: tos
type: STRING
- name: _3_mode
type: STRING
- name: _2002
type: FLOAT
- name: _2003
type: FLOAT
- name: _2004
type: FLOAT
- name: _2005
type: FLOAT
- name: _2006
type: FLOAT
- name: _2007
type: FLOAT
- name: _2008
type: FLOAT
- name: _2009
type: FLOAT
- name: _2010
type: FLOAT
- name: _2011
type: FLOAT
- name: _2012
type: FLOAT
- name: _2013
type: FLOAT
- name: _2014
type: FLOAT
- name: _2015
type: FLOAT
- name: _2016
type: FLOAT
- name: _2017
type: FLOAT
- name: _2018
type: FLOAT
- name: _2019
type: FLOAT
- name: _2020
type: FLOAT
- name: _2021
type: FLOAT
- name: _2022
type: FLOAT
- name: _2023
type: FLOAT
- name: _2024
type: FLOAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
operator: operators.ExternalTable
bucket: gs://calitp-ntd-xlsx-products-clean
prefix_bucket: false
post_hook: |
SELECT *
FROM `{{ get_project_id() }}`.external_ntd__ridership.historical__complete_monthly_ridership_with_adjustments_and_estimates__master
LIMIT 1;
source_objects:
- "complete_monthly_ridership_with_adjustments_and_estimates/historical/master/*.jsonl.gz"
destination_project_dataset_table: "external_ntd__ridership.historical__complete_monthly_ridership_with_adjustments_and_estimates__master"
source_format: NEWLINE_DELIMITED_JSON
use_bq_client: true
hive_options:
mode: AUTO
require_partition_filter: false
source_uri_prefix: "complete_monthly_ridership_with_adjustments_and_estimates/historical/master/"
schema_fields:
- name: ntd_id
type: NUMERIC
- name: legacy_ntd_id
type: STRING
- name: agency
type: STRING
- name: mode
type: STRING
- name: tos
type: STRING
- name: _3_mode
type: STRING
- name: mode_type_of_service_status
type: STRING
- name: reporter_type
type: STRING
- name: organization_type
type: STRING
- name: hq_city
type: STRING
- name: hq_state
type: STRING
- name: uace_cd
type: NUMERIC
- name: uza_name
type: STRING
- name: uza_sq_miles
type: NUMERIC
- name: uza_population
type: NUMERIC
- name: service_area_population
type: NUMERIC
- name: service_area_sq_miles
type: NUMERIC
- name: last_closed_report_year
type: NUMERIC
- name: last_closed_fy_end_month
type: NUMERIC
- name: last_closed_fy_end_year
type: NUMERIC
- name: passenger_miles_fy
type: FLOAT
- name: unlinked_passenger_trips_fy
type: FLOAT
- name: avg_trip_length_fy
type: FLOAT
- name: fares_fy
type: FLOAT
- name: operating_expenses_fy
type: FLOAT
- name: avg_cost_per_trip_fy
type: FLOAT
- name: avg_fares_per_trip_fy
type: FLOAT
Loading

0 comments on commit 8bbbde0

Please sign in to comment.