-
Notifications
You must be signed in to change notification settings - Fork 14
/
_seeds.yml
221 lines (206 loc) · 7.34 KB
/
_seeds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
version: 2
seeds:
- name: miles_traveled
description: |
A matrix of the distance between origin/destination pairs in miles.
columns:
- name: location_name
description: On location in the O/D pair
tests:
- unique
- name: off_location_name
description: Off location in the O/D pair
tests:
- unique
- name: distance_miles
description: Distance in miles between location_name and off_location_name.
- name: ntd_modes_to_full_names
description: |
A list of ntd 2 letter mode codes and their full names
columns:
- name: ntd_mode_abbreviation
description: The two letter abbreviation mode
tests:
- unique
- name: ntd_mode_full_name
description: The mode's full name
- name: payments_entity_mapping
columns:
- name: gtfs_dataset_source_record_id
description: Unversioned key to dim_gtfs_datasets natural key from Airtable.
- name: littlepay_participant_id
description: Littlepay-assigned Participant ID.
tests:
- unique
- name: elavon_customer_name
description: Elavon-assigned Customer Name.
tests:
- not_null
- unique
- name: gtfs_rt_validation_code_descriptions
description: |
A list of validation codes output by the GTFS RT validator, and their severities.
Originally sourced from https://docs.google.com/spreadsheets/d/1GDDaDlsBPCYn3dtYPSABnce9ns3ekJ8Jzfgyy56lZz4/edit#gid=617612870.
columns:
- name: code
tests:
- not_null
- unique
# TODO: delete/deprecate (v1 / superseded by the validator_rule_details tables)
- name: gtfs_schedule_validation_code_descriptions
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities.
Originally sourced from https://docs.google.com/spreadsheets/d/1GDDaDlsBPCYn3dtYPSABnce9ns3ekJ8Jzfgyy56lZz4/edit#gid=0.
columns:
- name: name
tests:
- not_null
- unique
- name: gtfs_schedule_validator_rule_details_v2_0_0
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities and descriptions.
This data was manually parsed from the contents of the RULES.md file in the v2.0.0 release of the validator,
sourced from: https://github.com/MobilityData/gtfs-validator/archive/refs/tags/v2.0.0.zip
columns:
- name: code
tests:
- not_null
- unique
- name: human_readable_description
tests:
- not_null
- name: version
tests:
- not_null
- name: severity
tests:
- not_null
- name: gtfs_schedule_validator_rule_details_v3_1_1
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities and descriptions.
This data was manually parsed from the contents of the RULES.md file in the v3.1.1 release of the validator,
sourced from: https://github.com/MobilityData/gtfs-validator/archive/refs/tags/v3.1.1.zip
columns:
- name: code
tests:
- not_null
- unique
- name: human_readable_description
tests:
- not_null
- name: version
tests:
- not_null
- name: severity
tests:
- not_null
- name: gtfs_schedule_validator_rule_details_v4_0_0
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities and descriptions.
This data was manually parsed from the contents of the RULES.md file in the v4.0.0 release of the validator,
sourced from: https://github.com/MobilityData/gtfs-validator/archive/refs/tags/v4.0.0.zip
columns:
- name: code
tests:
- not_null
- unique
- name: human_readable_description
tests:
- not_null
- name: version
tests:
- not_null
- name: severity
tests:
- not_null
- name: gtfs_schedule_validator_rule_details_v4_1_0
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities and descriptions.
This data was manually parsed from the contents of the RULES.md file in the v4.1.0 release of the validator,
sourced from: https://github.com/MobilityData/gtfs-validator/archive/refs/tags/v4.1.0.zip
columns:
- name: code
tests:
- not_null
- unique
- name: human_readable_description
tests:
- not_null
- name: version
tests:
- not_null
- name: severity
tests:
- not_null
- name: gtfs_schedule_validator_rule_details_v4_2_0
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities and descriptions.
This data was manually parsed from the contents of the RULES.md file in the v4.2.0 release of the validator,
sourced from: https://github.com/MobilityData/gtfs-validator/archive/refs/tags/v4.2.0.zip
columns:
- name: code
tests:
- not_null
- unique
- name: human_readable_description
tests:
- not_null
- name: version
tests:
- not_null
- name: severity
tests:
- not_null
- name: gtfs_schedule_validator_rule_details_v5_0_0
description: |
A list of validation codes output by the GTFS Schedule validator, and their severities and descriptions.
This data was manually parsed from the contents of the RULES.md file in the v5.0.0 release of the validator,
sourced from: https://github.com/MobilityData/gtfs-validator/releases/tag/v5.0.0
columns:
- name: code
tests:
- not_null
- unique
- name: human_readable_description
tests:
- not_null
- name: version
tests:
- not_null
- name: severity
tests:
- not_null
- name: _deprecated__ntd_agency_to_organization
description: |
*Deprecated May 2023 in favor of the `organizations.raw_ntd_id` column entered directly in Airtable.*
Extract of Airtable mapping from NTD agency info to
transit database organizations. Originally extracted
from stg_transit_database__ntd_agency_info with the following query.
select ntd_id, legacy_ntd_id, org.id as organization_record_id, org.name as organization_name
from staging.stg_transit_database__ntd_agency_info ntd
left join staging.stg_transit_database__organizations org
on ntd.organization_key = org.id
and ntd.dt = org.dt
where ntd.dt = (select max(dt) from staging.stg_transit_database__ntd_agency_info)
;
There are also a few records in here that were manually added after looking at the 2021 NTD
data and comparing that to see if any records were missing.
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- ntd_id
- organization_name
columns:
- name: ntd_id
tests:
- not_null
- unique
- name: legacy_ntd_id
tests:
- unique
- name: organization_record_id
tests:
- unique
- name: organization_name
tests:
- unique