-
Notifications
You must be signed in to change notification settings - Fork 8
/
mapping.yaml
38 lines (37 loc) · 953 Bytes
/
mapping.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
When:
Prefix: "/mylogs/"
Async: true
Batch:
Window:
DurationInSec: 120
Dest:
Pattern: "/mylogs/.+/.+/(\\d{4})/(\\d{2})/(\\d{2})/.+"
Table: myproject:mydataset.mytable_$1$2$3
SourceFormat: NEWLINE_DELIMITED_JSON
Transient:
Dataset: temp
Schema:
Template: myproject:mydataset.mytempate
Split:
ClusterColumns:
- meta.eventId
Mapping:
- When: meta.eventId IN (101, 102)
Then: myproject:mydataset.my_table1_$1$2$3
- When: meta.eventId IN (103, 104)
Then: myproject:mydataset.my_table2_$1$2$3
- When: meta.eventId > 104
Then: myproject:mydataset.my_table2_$Mod(10)_$1$2$3
OnSuccess:
- Action: delete
OnFailure:
- Action: notify
Request:
Channels:
- "#my_error_channel"
Title: My log ingestion
Message: "$Error"
Info:
Workflow: My log ingestion
ProjectURL: JIRA/WIKi or any link referece
LeadEngineer: [email protected]