-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdataflow.yaml
54 lines (50 loc) · 920 Bytes
/
dataflow.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
44
45
46
47
48
49
50
51
52
53
54
apiVersion: 0.5.0
meta:
name: split
version: 0.1.0
namespace: examples
config:
converter: json
types:
person:
type: object
properties:
name:
type: string
age:
type: i32
topics:
user:
schema:
value:
type: person
child:
schema:
value:
type: person
adult:
schema:
value:
type: person
services:
split-service:
sources:
- type: topic
id: user
sinks:
- type: topic
id: child
transforms:
- operator: filter
run: |
fn is_child(person: Person) -> Result<bool> {
Ok(person.age < 18)
}
- type: topic
id: adult
transforms:
- operator: filter
run: |
fn is_adult(person: Person) -> Result<bool> {
Ok(person.age >= 18)
}