-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtaxi.conf.template
86 lines (86 loc) · 2.53 KB
/
taxi.conf.template
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
input {
stdin { type => "tripdata" }
}
filter {
csv {
columns => ["VendorID","tpep_pickup_datetime","tpep_dropoff_datetime","passenger_count","trip_distance","RatecodeID","store_and_fwd_flag","PULocationID","DOLocationID","payment_type","fare_amount","extra","mta_tax","tip_amount","tolls_amount","improvement_surcharge","total_amount"]
convert => {"extra" => "float"}
convert => {"fare_amount" => "float"}
convert => {"improvement_surcharge" => "float"}
convert => {"mta_tax" => "float"}
convert => {"tip_amount" => "float"}
convert => {"tolls_amount" => "float"}
convert => {"total_amount" => "float"}
convert => {"trip_distance" => "float"}
convert => {"passenger_count" => "integer"}
}
date {
match => ["tpep_pickup_datetime", "yyyy-MM-dd HH:mm:ss", "ISO8601"]
timezone => "EST"
}
date {
match => ["tpep_pickup_datetime", "yyyy-MM-dd HH:mm:ss", "ISO8601"]
target => ["@tpep_pickup_datetime"]
remove_field => ["tpep_pickup_datetime"]
timezone => "EST"
}
date {
match => ["tpep_dropoff_datetime", "yyyy-MM-dd HH:mm:ss", "ISO8601"]
target => ["@tpep_dropoff_datetime"]
remove_field => ["tpep_dropoff_datetime"]
timezone => "EST"
}
translate {
field => "RatecodeID"
destination => "RatecodeID"
dictionary => [
"1", "Standard rate",
"2", "JFK",
"3", "Newark",
"4", "Nassau or Westchester",
"5", "Negotiated fare",
"6", "Group ride"
]
}
translate {
field => "VendorID"
destination => "VendorID_t"
dictionary => [
"1", "Creative Mobile Technologies",
"2", "VeriFone Inc"
]
}
translate {
field => "payment_type"
destination => "payment_type_t"
dictionary => [
"1", "Credit card",
"2", "Cash",
"3", "No charge",
"4", "Dispute",
"5", "Unknown",
"6", "Voided trip"
]
}
translate {
field => "PULocationID"
destination => "PULocationID_t"
dictionary_path => "taxi.csv"
}
translate {
field => "DOLocationID"
destination => "DOLocationID_t"
dictionary_path => "taxi.csv"
}
mutate {
remove_field => ["message", "column18", "column19", "RatecodeID", "VendorID", "payment_type", "PULocationID", "DOLocationID"]
}
}
output {
# stdout { codec => dots }
elasticsearch { hosts => ["localhost:9200"]
user => "<Enter elasticsearch user>"
password => "<Enter Password>"
index => "nyc-taxi-yellow-%{+YYYY.MM.dd}"
}
}