-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.py
97 lines (96 loc) · 4.07 KB
/
schema.py
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
from google.cloud.bigquery import SchemaField
# table schema
airmonitorSchema = [
SchemaField('TBTimestamp', 'TIMESTAMP', mode='REQUIRED'),
SchemaField('TETimestamp', 'TIMESTAMP', mode='REQUIRED'),
SchemaField('Latitude', 'STRING'),
SchemaField('Longitude', 'STRING'),
SchemaField('Altitude', 'STRING'),
SchemaField('AIRPRES_PreScaled', 'FLOAT'),
SchemaField('AIRPRES_Slope', 'FLOAT'),
SchemaField('AIRPRES_Offset', 'FLOAT'),
SchemaField('AIRPRES_Scaled', 'FLOAT'),
SchemaField('AIRPRES_UnitName', 'STRING'),
SchemaField('AIRPRES_Status', 'STRING'),
SchemaField('CO_PreScaled', 'FLOAT'),
SchemaField('CO_Slope', 'FLOAT'),
SchemaField('CO_Offset', 'FLOAT'),
SchemaField('CO_Scaled', 'FLOAT'),
SchemaField('CO_UnitName', 'STRING'),
SchemaField('CO_Status', 'STRING'),
SchemaField('HUM_PreScaled', 'FLOAT'),
SchemaField('HUM_Slope', 'FLOAT'),
SchemaField('HUM_Offset', 'FLOAT'),
SchemaField('HUM_Scaled', 'FLOAT'),
SchemaField('HUM_UnitName', 'STRING'),
SchemaField('HUM_Status', 'STRING'),
SchemaField('NO_PreScaled', 'FLOAT'),
SchemaField('NO_Slope', 'FLOAT'),
SchemaField('NO_Offset', 'FLOAT'),
SchemaField('NO_Scaled', 'FLOAT'),
SchemaField('NO_UnitName', 'STRING'),
SchemaField('NO_Status', 'STRING'),
SchemaField('NO2_PreScaled', 'FLOAT'),
SchemaField('NO2_Slope', 'FLOAT'),
SchemaField('NO2_Offset', 'FLOAT'),
SchemaField('NO2_Scaled', 'FLOAT'),
SchemaField('NO2_UnitName', 'STRING'),
SchemaField('NO2_Status', 'STRING'),
SchemaField('O3_PreScaled', 'FLOAT'),
SchemaField('O3_Slope', 'FLOAT'),
SchemaField('O3_Offset', 'FLOAT'),
SchemaField('O3_Scaled', 'FLOAT'),
SchemaField('O3_UnitName', 'STRING'),
SchemaField('O3_Status', 'STRING'),
SchemaField('SO2_PreScaled', 'FLOAT'),
SchemaField('SO2_Slope', 'FLOAT'),
SchemaField('SO2_Offset', 'FLOAT'),
SchemaField('SO2_Scaled', 'FLOAT'),
SchemaField('SO2_UnitName', 'STRING'),
SchemaField('SO2_Status', 'STRING'),
SchemaField('PM1_PreScaled', 'FLOAT'),
SchemaField('PM1_Slope', 'FLOAT'),
SchemaField('PM1_Offset', 'FLOAT'),
SchemaField('PM1_Scaled', 'FLOAT'),
SchemaField('PM1_UnitName', 'STRING'),
SchemaField('PM1_Status', 'STRING'),
SchemaField('PM10_PreScaled', 'FLOAT'),
SchemaField('PM10_Slope', 'FLOAT'),
SchemaField('PM10_Offset', 'FLOAT'),
SchemaField('PM10_Scaled', 'FLOAT'),
SchemaField('PM10_UnitName', 'STRING'),
SchemaField('PM10_Status', 'STRING'),
SchemaField('PM25_PreScaled', 'FLOAT'),
SchemaField('PM25_Slope', 'FLOAT'),
SchemaField('PM25_Offset', 'FLOAT'),
SchemaField('PM25_Scaled', 'FLOAT'),
SchemaField('PM25_UnitName', 'STRING'),
SchemaField('PM25_Status', 'STRING'),
SchemaField('PARTICLE_COUNT_PreScaled', 'FLOAT'),
SchemaField('PARTICLE_COUNT_Slope', 'FLOAT'),
SchemaField('PARTICLE_COUNT_Offset', 'FLOAT'),
SchemaField('PARTICLE_COUNT_Scaled', 'FLOAT'),
SchemaField('PARTICLE_COUNT_UnitName', 'STRING'),
SchemaField('PARTICLE_COUNT_Status', 'STRING'),
SchemaField('TEMP_PreScaled', 'FLOAT'),
SchemaField('TEMP_Slope', 'FLOAT'),
SchemaField('TEMP_Offset', 'FLOAT'),
SchemaField('TEMP_Scaled', 'FLOAT'),
SchemaField('TEMP_UnitName', 'STRING'),
SchemaField('TEMP_Status', 'STRING'),
SchemaField('TSP_PreScaled', 'FLOAT'), # total suspended particulate
SchemaField('TSP_Slope', 'FLOAT'),
SchemaField('TSP_Offset', 'FLOAT'),
SchemaField('TSP_Scaled', 'FLOAT'),
SchemaField('TSP_UnitName', 'STRING'),
SchemaField('TSP_Status', 'STRING'),
SchemaField('VOLTAGE_PreScaled', 'FLOAT'),
SchemaField('VOLTAGE_Slope', 'FLOAT'),
SchemaField('VOLTAGE_Offset', 'FLOAT'),
SchemaField('VOLTAGE_Scaled', 'FLOAT'),
SchemaField('VOLTAGE_UnitName', 'STRING'),
SchemaField('VOLTAGE_Status', 'STRING'),
SchemaField('UniqueId', 'INTEGER', mode='REQUIRED'),
SchemaField('StationName', 'STRING', mode='REQUIRED'),
SchemaField('IdString', 'STRING', mode='REQUIRED',
description="Str concat of timestamps, sensorlabels and ID.")]