-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
optd-qa-pipeline-simulation-por-optd-full.json
177 lines (177 loc) · 8.5 KB
/
optd-qa-pipeline-simulation-por-optd-full.json
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
{
"pipeline": {
"description": "Parsing the OPTD (OpenTravelData) POR (Points of Reference) QA (Quality Assurance) reports",
"processors": [
{
"grok": {
"field": "optd_qa_por_full",
"patterns": [
"^%{DATA:reporting_reason}\\^%{OPT_WORD:iata_code}\\^%{OPT_WORD:icao_code}\\^%{OPT_WORD:faa_code}\\^%{WORD:is_geonames}\\^%{INT:geoname_id}\\^%{OPT_INT:envelope_id}\\^%{DATA:name}\\^%{DATA:asciiname}\\^%{OPT_NUMBER:coord.lat}\\^%{OPT_NUMBER:coord.lon}\\^%{FCLASS:fclass}\\^%{OPT_WORD:fcode}\\^%{OPT_NUMBER:page_rank}\\^%{OPT_DATE:date_from}\\^%{OPT_DATE:date_until}\\^%{DATA:comment}\\^%{OPT_WORD:country_code}\\^%{OPT_WORD:cc2}\\^%{DATA:country_name}\\^%{DATA:continent_name}\\^%{OPT_WORD:adm1_code}\\^%{DATA:adm1_name_utf}\\^%{DATA:adm1_name_ascii}\\^%{OPT_WORD:adm2_code}\\^%{DATA:adm2_name_utf}\\^%{DATA:adm2_name_ascii}\\^%{OPT_WORD:adm3_code}\\^%{OPT_WORD:adm4_code}\\^%{OPT_INT:population}\\^%{OPT_INT:elevation}\\^%{OPT_INT:gtopo30}\\^%{DATA:timezone}\\^%{OPT_NUMBER:gmt_offset}\\^%{OPT_NUMBER:dst_offset}\\^%{OPT_NUMBER:raw_offset}\\^%{OPT_DATE:moddate}\\^%{DATA:city_code_list}\\^%{DATA:city_name_list}\\^%{DATA:city_detail_list}\\^%{DATA:tvl_por_list}\\^%{OPT_WORD:iso31662}\\^%{OPT_WORD:location_type}\\^%{DATA:wiki_link}\\^%{DATA:alt_name_section}\\^%{OPT_WORD:wac}\\^%{DATA:wac_name}\\^%{OPT_WORD:ccy_code}\\^%{DATA:unlc_list}\\^%{DATA:uic_list}\\^%{OPT_NUMBER:geo_coord.lat}\\^%{OPT_NUMBER:geo_coord.lon}\\^%{OPT_NUMBER:distance}\\^%{OPT_NUMBER:weighted_distance}$"
],
"pattern_definitions": {
"FCLASS": "[AHLPRSTUV]",
"OPT_DATE": "(%{YEAR}-%{MONTHNUM2}-%{MONTHDAY}|-1)?",
"OPT_INT": "(%{INT})?",
"OPT_NUMBER": "(%{NUMBER})?",
"OPT_WORD": "(%{WORD})?"
}
}
},
{
"remove": {
"field": "optd_qa_por_full"
}
},
{
"set": {
"field": "is_geonames",
"if": "ctx.is_geonames == 'Y'",
"value": true
}
},
{
"set": {
"field": "is_geonames",
"if": "ctx.is_geonames == 'N'",
"value": false
}
},
{
"set": {
"field": "coord.lat",
"if": "ctx.coord.lat == ''",
"value": 0.0
}
},
{
"set": {
"field": "coord.lon",
"if": "ctx.coord.lon == ''",
"value": 0.0
}
},
{
"set": {
"field": "geo_coord.lat",
"if": "ctx.geo_coord.lat == ''",
"value": "{{coord.lat}}"
}
},
{
"set": {
"field": "geo_coord.lon",
"if": "ctx.geo_coord.lon == ''",
"value": "{{coord.lon}}"
}
},
{
"set": {
"field": "page_rank",
"if": "ctx.page_rank == ''",
"value": 0.0
}
},
{
"set": {
"field": "date_from",
"if": "ctx.date_from == '-1'",
"value": "1970-01-01"
}
},
{
"set": {
"field": "date_until",
"if": "ctx.date_until == '-1'",
"value": "2099-12-31"
}
},
{
"set": {
"field": "moddate",
"if": "ctx.moddate == '-1'",
"value": "1970-01-01"
}
},
{
"date" : {
"field" : "timestamp",
"target_field" : "timestamp",
"formats" : ["yyyy-MM-dd HH:mm:ss"],
"timezone" : "Etc/UTC"
}
}
]
},
"docs": [
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "AAA1",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "AAA-C-6947726 not found in optd^AAA^NTGA^^Y^6947726^^Anaa Airport^Anaa Airport^-17.352606^-145.509956^S^AIRP^0.013618936015262465^^^^PF^^French Polynesia^Oceania^^^^^^^^^0^^8^Pacific/Tahiti^-10.0^-10.0^-10.0^2012-04-29^AAA^Anaa^AAA|4034700|Anaa|Anaa^^^A^https://en.wikipedia.org/wiki/Anaa_Airport^ru|Анаа|=wkdt|Q1430785|^823^French Polynesia^XPF^^^-17.34908^-145.51229^^"
}
},
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "AAA2",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "AAA-C-6947726 not found in optd^AAA^^^Y^4034700^^Anaa^Anaa^-17.41667^-145.5^T^ATOL^0.013618936015262465^^^^PF^^French Polynesia^Oceania^00^^^^^^^^0^^-9999^Pacific/Tahiti^-10.0^-10.0^-10.0^2019-02-10^AAA^Anaa^AAA|4034700|Anaa|Anaa^AAA^^C^https://en.wikipedia.org/wiki/Anaa^|Anaa|=es|Isla de Todos Santos|=|Anau|=|Tapuhoe|=|Anhar|=en|Chain|=fr|La Chaîne|=en|Chain Island|=fr|La Conversión de San Pablo|=en|Anaa Atoll|=en|Anaa|s=ar|أنا|=gl|Atol Anaa|=hy|Անա|=mrj|Анаа|=ur|انآ|=ru|Анаа|=zh|阿納環礁|^823^French Polynesia^XPF^^^^^^"
}
},
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "BVD",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "^BVD^^^N^0^^Beaver Inlet AK US Sea Port^Beaver Inlet AK US Sea Port^66.36^-147.4^S^AIRP^^^^^US^^United States^North America^^^^^^^^^^^^America/Anchorage^^^^-1^BVD^Beaver Inlet AK US Sea Port^BVD|0|Beaver Inlet AK US Sea Port|Beaver Inlet AK US Sea Port^BVD^AK^CA^^^1^Alaska^USD^^^^^^"
}
},
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "BSL",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "^BSL^LFSB^^Y^6299466^^EuroAirport Basel–Mulhouse–Freiburg^EuroAirport Basel-Mulhouse-Freiburg^47.58958^7.52991^S^AIRP^0.09830056026668005^^^^FR^^France^Europe^44^Grand Est^Grand Est^68^Haut-Rhin^Haut-Rhin^684^68135^0^269^263^Europe/Paris^1.0^2.0^1.0^2020-03-15^BSL^Basel^BSL|2661604|Basel|Basel^^GES^A^https://en.wikipedia.org/wiki/EuroAirport_Basel_Mulhouse_Freiburg^es|Aeropuerto de Basilea-Mulhouse-Friburgo|=de|Flughafen Basel-Mülhausen|=it|Aeroporto di Basilea-Mulhouse-Friburgo|=ca|Aeroport de Basilea-Mulhouse-Friburg|=en|EuroAirport Basel–Mulhouse–Freiburg|p=fr|Aéroport de Bâle-Mulhouse-Fribourg|=wuu|巴塞尔-米卢斯-弗赖堡欧洲机场|=ru|Международный аэропорт Базель-Мюлуз-Фрайбург|=ja|ユーロエアポート|=fa|فرودگاه بازل-مولوز-فرایبورگ اروپا|^427^France^EUR^CHBSL|=FRMLH|^^^^^"
}
},
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "EAP",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "^EAP^LFSB^^Y^6299466^^EuroAirport Basel–Mulhouse–Freiburg^EuroAirport Basel-Mulhouse-Freiburg^47.58958^7.52991^S^AIRP^^^^^FR^^France^Europe^44^Grand Est^Grand Est^68^Haut-Rhin^Haut-Rhin^684^68135^0^269^263^Europe/Paris^1.0^2.0^1.0^2020-03-15^BSL,MLH^Basel=Mulhouse^BSL|2661604|Basel|Basel=MLH|2991214|Mulhouse|Mulhouse^^GES^A^https://en.wikipedia.org/wiki/EuroAirport_Basel_Mulhouse_Freiburg^es|Aeropuerto de Basilea-Mulhouse-Friburgo|=de|Flughafen Basel-Mülhausen|=it|Aeroporto di Basilea-Mulhouse-Friburgo|=ca|Aeroport de Basilea-Mulhouse-Friburg|=en|EuroAirport Basel–Mulhouse–Freiburg|p=fr|Aéroport de Bâle-Mulhouse-Fribourg|=wuu|巴塞尔-米卢斯-弗赖堡欧洲机场|=ru|Международный аэропорт Базель-Мюлуз-Фрайбург|=ja|ユーロエアポート|=fa|فرودگاه بازل-مولوز-فرایبورگ اروپا|^427^France^EUR^CHBSL|=FRMLH|^^^^^"
}
},
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "MLH",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "^MLH^LFSB^^Y^6299466^^EuroAirport Basel–Mulhouse–Freiburg^EuroAirport Basel-Mulhouse-Freiburg^47.58958^7.52991^S^AIRP^0.013945526285525285^^^^FR^^France^Europe^44^Grand Est^Grand Est^68^Haut-Rhin^Haut-Rhin^684^68135^0^269^263^Europe/Paris^1.0^2.0^1.0^2020-03-15^MLH^Mulhouse^MLH|2991214|Mulhouse|Mulhouse^^GES^A^https://en.wikipedia.org/wiki/EuroAirport_Basel_Mulhouse_Freiburg^es|Aeropuerto de Basilea-Mulhouse-Friburgo|=de|Flughafen Basel-Mülhausen|=it|Aeroporto di Basilea-Mulhouse-Friburgo|=ca|Aeroport de Basilea-Mulhouse-Friburg|=en|EuroAirport Basel–Mulhouse–Freiburg|p=fr|Aéroport de Bâle-Mulhouse-Fribourg|=wuu|巴塞尔-米卢斯-弗赖堡欧洲机场|=ru|Международный аэропорт Базель-Мюлуз-Фрайбург|=ja|ユーロエアポート|=fa|فرودگاه بازل-مولوز-فرایبورگ اروپا|^427^France^EUR^CHBSL|=FRMLH|^^^^^"
}
},
{
"_index": "optd-qa-por-full",
"_type": "optd_qa_por_full",
"_id": "NSX",
"_score": 1,
"_source": {
"timestamp": "2020-03-29 15:12:23",
"optd_qa_por_full": "^NSX^^^N^0^^Virgin Gorda VG North Sound La^Virgin Gorda VG North Sound La^18.5^-64.37^S^PRT^^^^^VG^^British Virgin Islands^North America^^^^^^^^^^^^America/Tortola^^^^-1^VIJ^Virgin Gorda^VIJ|3577325|Virgin Gorda|Virgin Gorda|VG|^NSX,VIJ^^CP^^^282^British Virgin Islands^USD^^^^^^"
}
}
]
}