-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtfl-cycle-journey-pipeline.conf
51 lines (45 loc) · 1 KB
/
tfl-cycle-journey-pipeline.conf
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
input {
file {
mode => "read"
path => "${CYCLE_JOURNEY_CSV_PATH}"
}
}
filter {
csv {
remove_field => ["message"]
}
if [column1] == "Rental Id" {
drop {}
}
date {
match => ["column4", "dd/mm/yyyy HH:mm"]
target => "EndDate"
remove_field => ["column4"]
}
date {
match => ["column7", "dd/mm/yyyy HH:mm"]
target => "StartDate"
remove_field => ["column7"]
}
mutate {
rename => {
"column1" => "RentalId"
"column2" => "Duration"
"column3" => "BikeId"
"column5" => "EndStationId"
"column6" => "EndStationName"
"column8" => "StartStationId"
"column9" => "StartStationName"
}
copy => {
"StartDate" => "@timestamp"
}
}
}
output {
elasticsearch {
hosts => ["http://10.0.200.101:9200"]
index => "cycle-journeys"
document_id => "%{RentalId}"
}
}