-
Notifications
You must be signed in to change notification settings - Fork 9
/
job.json
executable file
·55 lines (55 loc) · 1.42 KB
/
job.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
{
"name": "transform-user-events",
"actions": [
{
"name": "load users",
"actor": {
"type": "file",
"properties": {
"format": "csv",
"options": {
"header": false,
"delimiter": ",",
"quote": "\"",
"timestampFormat": "yyyy/MM/dd HH:mm:ss"
},
"ddlSchemaString": "user_id long, birth_year int, gender string, location string",
"fileUri": "${events.users_input}"
}
},
"output-view": {
"name": "users",
"global": "true"
}
},
{
"name": "load events",
"actor": {
"type": "flat",
"properties": {
"fileUri": "${events.events_input}"
}
},
"output-view": {
"name": "events_raw",
"global": false
}
},
{
"name": "transform-events",
"actor": {
"type": "sql",
"properties": {
"sqlString": "select substr(row_value, 1, 12) as event_id, substr(row_value, 13, 16) as event_time, substr(row_value, 29, 12) as event_host, substr(row_value, 41, 64) as event_location from events_raw where row_no not in (1, 2) and substr(row_value, 6, 5) != 'TFYKR'"
}
},
"input-views": [
"events_raw"
],
"output-view": {
"name": "events",
"global": true
}
}
]
}