You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# description: To avoid cluttering your storage, we will remove the downloaded files
84
+
85
+
86
+
- id: bq_vehicles_data
87
+
type: io.kestra.plugin.gcp.bigquery.Query
88
+
sql: |
89
+
CREATE TABLE IF NOT EXISTS `{{kv('GCP_PROJECT_ID')}}.{{kv('GCP_DATASET')}}.vehicles_data`(
90
+
unique_id_vehicle BYTES OPTIONS(description = 'Unique key for this dataset'),
91
+
crash_unit_id INTEGER OPTIONS (description = 'A unique identifier for each vehicle record.'),
92
+
crash_record_id STRING OPTIONS (description = 'This number can be used to link to the same crash in the Crashes and People datasets. This number also serves as a unique ID in the Crashes dataset.'),
93
+
crash_date TIMESTAMP OPTIONS (description = 'Date and time of crash as entered by the reporting officer'),
94
+
unit_no INTEGER OPTIONS (description = 'A unique ID for each unit within a specific crash report.'),
95
+
unit_type STRING OPTIONS (description ='The type of unit'),
96
+
vehicle_id STRING OPTIONS (description = '') ,
97
+
make STRING OPTIONS (description = 'The make (brand) of the vehicle, if relevant'),
98
+
model STRING OPTIONS (description = 'The model of the vehicle, if relevant'),
vehicle_type STRING OPTIONS (description = 'The type of vehicle, if relevant'),
101
+
vehicle_use STRING OPTIONS (description ='The normal use of the vehicle, if relevant'),
102
+
travel_direction STRING OPTIONS (description = 'The direction in which the unit was traveling prior to the crash, as determined by the reporting officer'),
103
+
maneuver STRING OPTIONS (description = 'The action the unit was taking prior to the crash, as determined by the reporting officer'), occupant_cnt STRING OPTIONS (description = 'The number of people in the unit, as determined by the reporting officer'),
vehicle_year STRING OPTIONS (description = 'The model year of the vehicle, if relevant')
106
+
)
107
+
PARTITION BY DATE(crash_date)
108
+
109
+
110
+
- id: bq_vehicles_data_external
111
+
type: io.kestra.plugin.gcp.bigquery.Query
112
+
sql: |
113
+
CREATE OR REPLACE EXTERNAL TABLE `{{kv('GCP_PROJECT_ID')}}.{{kv('GCP_DATASET')}}.vehicles_data_ext`(
114
+
crash_unit_id INTEGER OPTIONS (description = 'A unique identifier for each vehicle record.'),
115
+
crash_record_id STRING OPTIONS (description = 'This number can be used to link to the same crash in the Crashes and People datasets. This number also serves as a unique ID in the Crashes dataset.'),
116
+
crash_date TIMESTAMP OPTIONS (description = 'Date and time of crash as entered by the reporting officer'),
117
+
unit_no INTEGER OPTIONS (description = 'A unique ID for each unit within a specific crash report.'),
118
+
unit_type STRING OPTIONS (description ='The type of unit'),
119
+
vehicle_id STRING OPTIONS (description = '') ,
120
+
make STRING OPTIONS (description = 'The make (brand) of the vehicle, if relevant'),
121
+
model STRING OPTIONS (description = 'The model of the vehicle, if relevant'),
vehicle_type STRING OPTIONS (description = 'The type of vehicle, if relevant'),
124
+
vehicle_use STRING OPTIONS (description ='The normal use of the vehicle, if relevant'),
125
+
travel_direction STRING OPTIONS (description = 'The direction in which the unit was traveling prior to the crash, as determined by the reporting officer'),
126
+
maneuver STRING OPTIONS (description = 'The action the unit was taking prior to the crash, as determined by the reporting officer'), occupant_cnt STRING OPTIONS (description = 'The number of people in the unit, as determined by the reporting officer'),
0 commit comments