forked from numaproj/numaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
11-join-on-sink.yaml
50 lines (49 loc) · 1.17 KB
/
11-join-on-sink.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
# A somewhat silly example of how to Join on a Sink Vertex.
# Data is conditionally forwarded to either even-cat or odd-cat, and then all data is re-joined on the Sink Vertex.
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: join-on-sink
spec:
vertices:
- name: in
source:
http: {}
- name: even-or-odd
udf:
container:
# Tell the input number is even or odd, see https://github.com/numaproj/numaflow-go/tree/main/pkg/mapper/examples/even_odd
image: quay.io/numaio/numaflow-go/map-even-odd:stable
- name: even-cat
udf:
builtin:
name: cat
- name: odd-cat
udf:
builtin:
name: cat
- name: out
sink:
# A simple log printing sink
log: {}
edges:
- from: in
to: even-or-odd
- from: even-or-odd
to: even-cat
conditions:
tags:
operator: or
values:
- even-tag
- from: even-or-odd
to: odd-cat
conditions:
tags:
operator: or
values:
- odd-tag
- from: even-cat
to: out
- from: odd-cat
to: out