-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathjob.yaml
executable file
·43 lines (43 loc) · 1.23 KB
/
job.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
43
job:
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