-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yaml
42 lines (42 loc) · 1.07 KB
/
config.yaml
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
#test cmd: curl "http://127.0.0.1:4195/post" -d "sad" -v
input:
http_server:
path: /post
allowed_verbs:
- POST
timeout: 5s
sync_response:
status: "200"
headers:
Content-Type: application/json
pipeline:
processors:
- cached:
key: '${! content() }'
cache: sentiment_cache
processors:
- bloblang: root = content().sentiment().string()
- log:
message: '${! content() }'
- sql_insert:
driver: postgres
dsn: postgres://postgres:p4ssw0rd@localhost:5432/dev?sslmode=disable
table: sink
columns: [ compound, negative, neutral, positive ]
args_mapping: |
root = [
this.Compound,
this.Negative,
this.Neutral,
this.Positive
]
- sync_response: {}
output:
label: ""
file:
path: "./output.txt"
codec: lines
cache_resources:
- label: sentiment_cache
redis:
url: tcp://localhost:6379